Dave's Brain

Browse - Computer Tips - How I can find the top ten most recently changed files in a folder?

Date: 2012feb25
OS: Linux
Level: beginner

Q.  How I can find the top ten most recently changed files in a folder?

A.  Use the -t option of ls.  Then pipe it to head which will display
the top ten:

ls -lt | head
To find the oldest files:
ls -lrt | head

Add a comment

Sign in to add a comment
Copyright © 2008-2017, dave - Code samples on Dave's Brain is licensed under the Creative Commons Attribution 2.5 License. However other material, including English text has all rights reserved.