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

I need to show all .php files created or modified within 1 day (or last tot entries)

Is there a command for this?

share|improve this question

Try this

find / -name "*.php" -mtime -1

You can restrict it to a subdirectory by changing / to something like /var/www/.

share|improve this answer
-mtime -1 means -1 days? – dynamic Mar 6 '12 at 13:31
It means less than 1 day ... – Iain Mar 6 '12 at 13:33
You can also put +1 in there which means "more than one day ago" rather than "modified one day in the future". – Ladadadada Mar 6 '12 at 13:48

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.