How to sort files in Linux in date order

Use the following flags with ‘ls’ to control the directory date sort order:
ls -lat
-l is for long style
-a is for all (including hidden files)
-t is to specify that want ordered by date
That above example will show the dates in reverse date order. To see in forward date order, do this:
ls -latr

That will do the opposite

Reference:

Share this article

Share on facebook
Share on twitter
Share on linkedin
Scroll to Top