Linux – How to sort the output of ‘ls’ by last modified date

linuxlsshellunix

How can I sort the output of ls by last modified date?

Best Answer

ls -t

or (for reverse, most recent at bottom):

ls -tr

The ls man page describes this in more details, and lists other options.