Linux: Find files changed or modified within 1 day or older than 1 day

by Yang Yang on September 9, 2009

Share This Article:
Subscribe to Kavoir: blog feed

One of the utility commands of Linux that you should know in the first day of your Linux learning seminar is find.

To search recursively in the directory somedir for files changed / created / modified within 1 day:

find somedir -ctime -1

To search recursively in the directory somedir for files changed changed / created / modified more than 1 days ago:

find somedir -ctime +1

To search recursively in the directory somedir for files modified within 1 day:

find somedir -mtime -1

To search recursively in the directory somedir for files modified more than 1 days ago:

find somedir -mtime +1
Share This Article:
Subscribe to Kavoir: blog feed

You should also read:

{ 1 comment… read it below or add one }

Pradeep August 18, 2010 at 7:07 pm

Using this, I will try to find which images have been uploaded recently(within 7 days), by my users. And may be their size also.

find /public_html/upload/ -regex “\.gif|\.png|\.jpg|\.jpeg” -mtime -7

Reviews welcome.

Reply

Leave a Comment

Previous post:

Next post: