Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

1 Answer 1

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.