ls (-t option) sort by modification time

GNU command

$ls -l
total 40
drwxr-xr-x  3 jeffrin jeffrin 4096 Aug 18 20:16 beautifulwork
drwxr-xr-x  5 jeffrin jeffrin 4096 Aug 18 20:16 books
drwxr-xr-x  2 jeffrin jeffrin 4096 Aug 18 20:16 bugs-general
drwxr-xr-x  2 jeffrin jeffrin 4096 Oct 13 20:27 config-files
drwxr-xr-x  3 jeffrin jeffrin 4096 Aug 24 22:03 debian-howtos
drwxr-xr-x  2 jeffrin jeffrin 4096 Oct 20 21:59 Docs
drwxr-xr-x  3 jeffrin jeffrin 4096 Oct 19 20:15 https:
drwxr-xr-x  6 jeffrin jeffrin 4096 Oct 21 01:00 language
drwxr-xr-x 10 jeffrin jeffrin 4096 Aug 18 20:16 linux
drwxr-xr-x  6 jeffrin jeffrin 4096 Aug 18 20:16 ovlfose
-rw-r--r--  1 jeffrin jeffrin    0 Aug 18 20:16 README
$ls -l -t
total 40
drwxr-xr-x  6 jeffrin jeffrin 4096 Oct 21 01:00 language
drwxr-xr-x  2 jeffrin jeffrin 4096 Oct 20 21:59 Docs
drwxr-xr-x  3 jeffrin jeffrin 4096 Oct 19 20:15 https:
drwxr-xr-x  2 jeffrin jeffrin 4096 Oct 13 20:27 config-files
drwxr-xr-x  3 jeffrin jeffrin 4096 Aug 24 22:03 debian-howtos
drwxr-xr-x  3 jeffrin jeffrin 4096 Aug 18 20:16 beautifulwork
drwxr-xr-x  5 jeffrin jeffrin 4096 Aug 18 20:16 books
drwxr-xr-x  2 jeffrin jeffrin 4096 Aug 18 20:16 bugs-general
drwxr-xr-x 10 jeffrin jeffrin 4096 Aug 18 20:16 linux
drwxr-xr-x  6 jeffrin jeffrin 4096 Aug 18 20:16 ovlfose
-rw-r--r--  1 jeffrin jeffrin    0 Aug 18 20:16 README
$

GNU Explanation

-t     sort by modification time, newest first

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s