To find all files modified after a certain date and time

To find all files (regular files) modified after 12:00 AM today use

touch -t `date +%Y%m%d0000` /tmp/mintimestamp
find /path/to/search/for -type f -newer /tmp/mintimestamp
rm /tmp/mintimestamp

The trick is to timestamp /tmp/mintimestamp with the timestamp that we want to compare against.

So you would use the touch command below in the above set of commands to find all files modified after 12:00 AM on Jan 1, 2008:

touch -t `date 200801010000` /tmp/mintimestamp

Tags: , ,

Leave a Reply