Friday, April 28, 2006

Unix : Find files modified within a certain time period

So there I was trying to find where this application stored its @#$% log file.

Eventually had a brainwave and decided to search for all files recently modified.

A quick Google bought up the Find command:

Find / -mtime [+|-] value

The "+" or "-" indicates before or after e.g.

-4 indicates all files modified within the last 4 days

+4 indicates all files modified more than 4 days ago

4 indicates all files modified 4 days ago only

0 indicates all files modified in the last 24 hours.

Enjoy!

No comments: