Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

find is a great tool for finding files. It has the option to find files that were modified in the last X days with -mtime. However I'd like something more fine grained than that. I want to be able to find files that were modified in the last 2 hours. Is there some way to make find (or some other similar tool) do this?

share|improve this question
up vote 11 down vote accepted

man find


File's data was last modified n minutes ago.

share|improve this answer
also see Tometzsk'y answer to… – Paul Feb 16 '10 at 17:21
to be more verbose, find . -mmin -120 will find all files with an mtime within the past 2 hours – Paul Feb 16 '10 at 19:07

An alternative to Paul Brewer's (best) answer: -newer. It essentially finds anything newer than a file. So you can use touch to create a timestamp for a file in the past, then see what's newer than that.

touch -t 201002160900 timestamp
find . -newer timestamp
share|improve this answer
This trick is great when you need to find stuff modified by running a command (touch timestamp && (some command) && find ...) – voretaq7 Feb 16 '10 at 17:28

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.