Prints the latest modified files in a directory tree recursively

find . -name '*pdf*' -print0 | xargs -0 ls -lt | head -20
Sorts by latest modified files by looking to current directory and all subdirectories
Sample Output
fuat$ find . -name '*pdf*' -print0 | xargs -0 ls -lt | head -20
-rwxrwxrwx@ 1 fuat  staff    2416379 Sep 30 22:36 ./Software Engineering/Book/debug_it.pdf
-rw-r--r--@ 1 fuat  staff     852248 Sep 30 00:14 ./_READING/NLPWithPython.pdf alias
-rw-r--r--@ 1 fuat  staff     852292 Sep 30 00:12 ./_READING/HeadFirstNetworking.pdf alias
-rw-r--r--@ 1 fuat  staff   16214242 Sep 24 16:20 ./Algorithms/Algorithms_for_Interviews.pdf
-rw-r--r--@ 1 fuat  staff    4349195 Sep 24 13:46 ./Java/General/JavaProgrammingFundamentals.pdf
-rw-r--r--@ 1 fuat  staff   11168880 Sep 24 13:34 ./Distributed System/1617290521_HBas.pdf
-rw-r--r--@ 1 fuat  staff    5920000 Sep 24 13:32 ./Stream Processing/Storm.pdf
-rw-r--r--@ 1 fuat  staff   13571530 Sep 24 13:24 ./Database/InMemoryDataManagement.pdf
-rw-r--r--@ 1 fuat  staff   12625760 Sep 24 13:13 ./Network/ComputerNetworkingTopDown.pdf
-rw-r--r--@ 1 fuat  staff    3290769 Sep 24 13:01 ./Algorithms/GraphAlgorithms.pdf
-rw-r--r--@ 1 fuat  staff   24854307 Sep 24 11:18 ./Java/OSGi/EnterpriseOSGiINAction.pdf
-rw-r--r--@ 1 fuat  staff   39195922 Sep 24 11:16 ./Operating System/OSXMountainLion.pdf
-rw-r--r--@ 1 fuat  staff    5593725 Sep 24 11:11 ./Software Engineering/Book/EffectiveUnitTesting.pdf
-rw-r--r--@ 1 fuat  staff    9917832 Sep 24 11:06 ./Stream Processing/Twisted.pdf
-rw-r--r--@ 1 fuat  staff   11022359 Sep 24 11:05 ./Message Queues/ZeroMQ.pdf
-rw-r--r--@ 1 fuat  staff    3155642 Sep 24 11:02 ./Source Control/Git35-672.pdf
-rw-r--r--@ 1 fuat  staff    4718051 Sep 24 10:59 ./Data Mining/RobustDataMining.pdf
-rw-r--r--@ 1 fuat  staff   38314681 Sep 24 10:55 ./Ruby/Rails515775.pdf
-rw-r--r--@ 1 fuat  staff   37028497 Sep 24 10:53 ./User Interface/11445Interactivity2nd.pdf
-rw-r--r--@ 1 fuat  staff    6139406 Sep 24 10:52 ./User Interface/UI_154783.pdf

By: fuats
2013-10-03 21:58:51

What Others Think

Here they discussed some of the codes that help in printing the latest modified files in a directory tree recursively so as the explanation is not that given I don't think that everyone can understand the code that you have discussed here more helpful hints
Kaitlyn · 53 weeks and 3 days ago
So thoughtful of you to share the details here. Adding the code along with the post made it easier to follow the instruction. construction software management Being new to the whole code having such detailed code offers a better understanding of the program.
browneclaire42 · 53 weeks and 3 days ago
The above command is used to print the latest modified files in a directory tree recursively. You can learn build your diamond ring so many such unix commands from here and this website is the perfect source for learning. I am looking here for more updates on that.
Alyssalauren · 20 weeks and 6 days 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? 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.


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: