list files in mtime order

ls -lt | more
Simple but useful; list files in the current directory in mtime order. Useful if you've been working on something and then take a day or two off.
Sample Output
total 1180
-rw-r--r-- 1 george george   1484 2010-02-20 12:43 ArgusEvents.o
-rw-r--r-- 1 george george   3572 2010-02-20 12:43 ArgusApp.o
-rw-r--r-- 1 george george    709 2010-02-20 12:43 ArgusAuth.o
-rw-r--r-- 1 george george   3272 2010-02-20 12:43 ArgusFrag.o
-rw-r--r-- 1 george george   1840 2010-02-20 12:43 ArgusArp.o
-rw-r--r-- 1 george george   1315 2010-02-20 12:43 ArgusEsp.o
-rw-r--r-- 1 george george    963 2010-02-20 12:43 ArgusIgmp.o
-rw-r--r-- 1 george george   3484 2010-02-20 12:43 ArgusIcmp.o
-rw-r--r-- 1 george george   7216 2010-02-20 12:43 ArgusTcp.o
-rw-r--r-- 1 george george    850 2010-02-20 12:43 ArgusUdp.o
-rw-r--r-- 1 george george  14724 2010-02-20 12:43 ArgusOutput.o
-rw-r--r-- 1 george george  21392 2010-02-20 12:43 ArgusUtil.o
-rw-r--r-- 1 george george  26932 2010-02-20 12:43 ArgusSource.o
-rw-r--r-- 1 george george  42720 2010-02-20 12:43 ArgusModeler.o
-rw-r--r-- 1 george george  29964 2010-02-20 12:43 argus.o
-rw-r--r-- 1 george george   5775 2010-02-20 12:42 Makefile
-r--r--r-- 1 george george  28623 2010-02-13 16:10 ArgusTcp.c

3
By: eludom
2010-05-27 12:44:39
ls

What Others Think

less is more. :) ls -lt | less
atoponce · 486 weeks and 1 day ago
Good thing to remember. Also you can do ls -tr and get the lastest file you updated. Handy when you have a pile of files in the directory.
hckhckhck · 486 weeks and 1 day ago

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands



Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: