LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Display files by date (descending) (https://www.linuxquestions.org/questions/linux-newbie-8/display-files-by-date-descending-665799/)

djgenesis 08-27-2008 10:20 AM

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....

djgenesis 08-27-2008 10:22 AM

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 :)

colucix 08-27-2008 10:23 AM

Code:

-r, --reverse
      reverse order while sorting

Edit: too late! ;)


All times are GMT -5. The time now is 05:56 AM.