Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Using linux commands , is there way to list files which are created an hour (or particular date) before ?.

share|improve this question
up vote 2 down vote accepted

you can use the find command along with -mmin and -mtime flags. For example to list *.txt files in Downloads folder modified more than 30 days ago use this:

find $HOME/Downloads -name  '*.txt' -mtime +30

+ implies more than

share|improve this answer
Valid answer, but a note to Original Question: this depends on the file metadata stored with on the filesystem. This can be reset by the touch command. In short, you can never know 100% when it was changed. – Rich Homolka May 20 '11 at 23:10
@Rich. Thanks for sharing the note. I agree. In my reqs, I wanted to cleanup iso files built doing last compliations. it takes so much space. So, I wanted to cleanup everytime after successful completion of build. – sudurais May 22 '11 at 5:12

The find command's -mmin and -mtime predicates can select files based on their mtime.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.