Open Source · TechIt

Finding files newer than a certain date / time

Today I needed to find all files in a directory tree that had been updated since a specific point in time.

After a few trials this solution worked perfectly.

Create a file “touched” at the date you want to start from.

Then do a “find” that uses this file’s timestamp as a reference.

As simple as:

touch -t 201109130845 start-file.tmp
find messages/ -newer start-file.tmp

Advertisements

2 thoughts on “Finding files newer than a certain date / time

  1. This specific posting, “Finding files newer than a certain date / time An Cuasán” indicates the fact that you
    really comprehend just what exactly u r communicating about!
    I really entirely agree with your blog. Many thanks -Tegan

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s