Unix: Find What You've Recently Edited

Sometimes, I have found it extremely useful to search my computer for files that I have recently edited. Fortunately, unix/linux folk have the command line to use (there may be windows equivelants, I really don’t know though). Here are some easy and useful ways to search. So – open up the Terminal/Command line and have at it: (Note: the find command always searches recursively)



Search for files you’ve edited within the last 7 days on your entire computer
$ find / -mtime -7

Search a specific folder for files you’ve edited in the last 60 minutes
$ find ~/Sites/testsite -mmin -60

Search for files in the current directory ending in .php that you’ve edited in the last day
$ find . -name "*.php" -mtime -1

Search for files you’ve edited more than 3 days ago but not longer than 5 days ago
$ find . -mtime +3 -mtime -5

This entry was posted in Unix. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">