LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-27-2008, 10:20 AM   #1
djgenesis
LQ Newbie
 
Registered: Jul 2005
Location: UK
Distribution: Ubuntu Hoary Hedgehog.
Posts: 18

Rep: Reputation: 0
Display files by date (descending)


Hi all,

I have been trying to display the contents of a directory with "ls" but I can't seem to be able to sort the files by descending date order.

Code:
 ls -utla
seems to be doing what I want it to do but I need the reverse of that....
 
Old 08-27-2008, 10:22 AM   #2
djgenesis
LQ Newbie
 
Registered: Jul 2005
Location: UK
Distribution: Ubuntu Hoary Hedgehog.
Posts: 18

Original Poster
Rep: Reputation: 0
Never mind... I found it:

Code:
 ls -utlr
seems to do the trick

The -r switch reverses the order..

In MAN page:

Quote:

-r Reverses the order of sort to get reverse alphabetic
or oldest first as appropriate.
Thank you
 
Old 08-27-2008, 10:23 AM   #3
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978
Code:
-r, --reverse
       reverse order while sorting
Edit: too late!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Why does date always display utc? cmnorton Ubuntu 2 05-23-2008 10:01 AM
previous day date display script tmaxx Linux - General 3 04-20-2007 01:20 AM
display date user52 Linux - Newbie 2 11-28-2006 07:20 AM
deleting directory w/o descending STAGED Linux - Newbie 5 08-24-2005 08:39 AM
Date display in Thunderbird kbcnetau Linux - Software 5 04-08-2005 08:27 PM


All times are GMT -5. The time now is 07:10 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration