How to sort a Linux directory by date

Use the following flags to order a directory listing by date in forward order:

ls -lat

To show a directory listing in reverse order, use the following flags:

ls -latr

Reference:
https://superuser.com/questions/147027/how-can-i-sort-the-output-of-ls-by-last-modified-date/1234546

Share this article

Leave a Reply

Your email address will not be published.

Scroll to Top