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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ls -t

Status
Not open for further replies.

we2aresame

Technical User
Feb 10, 2003
128
CA
we know ls -t will sorts file by time of last modification (latest first), who can tell me how to sorts file by time of first modifiction(latest last), thanks.
 
try "ls -tr" ( r for reverse order ) ;-)
 
Here is another tip:

ls -lt | head

will show you just the most recent 9 or 10 files in the subdirectory. The same applies to the reverse order by date that you were asking about earlier:

ls -ltr | head

will give you the oldest 9 or 10 files.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top