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


Share this article

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to Top