Find files modified before or after a given date

From Linux.ie :: Using the find command.

To locate files that have been modified since some arbitrary date use this little trick:

touch -d "13 may 2001 17:54:19" date_marker
find . -newer date_marker 

To find files created before that date, use the cnewer and negation conditions:

find . \! -cnewer date_marker

Note: After testing, the following doesn't seem to work properly:

From the The Linux Cookbook: Tips and Techniques for Everyday Use - Finding Files.

To list all of the files in the `/usr' directory tree that were modified one year or longer ago, type:

find /usr -mtime +356 -daystart

To list all of the files in your home directory tree that were modified from two to four days ago, type:

find ~ -mtime 2 -mtime -4 -daystart
Last modified: 04/12/06 09:49:29
Go to top

Related Pages

No related pages or links.

Login/out

Login

Forgot Password?
Go to top
Go to top