Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sort directory

Status
Not open for further replies.

pirolgra

Technical User
Nov 11, 2002
25
IT
what's the command to sort the directory in descending order ?

thanks
 
By date? ls -ltr will give a list of files, oldest first. ls -lt will give you the newest first (add a | pg to pause one page at a time).
 
I don't think there is one - I tryed man ls which is where you should start.

What I use to sort by size is
Code:
du -sk * | sort -rn | pg

Columb Healy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top