Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

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

How can I Get a list of all files modified , say 3 months ago. I checked this question but I was not able to apply it to my scenario. I am trying this now , it seems to be working , but I know there should be a better way using find.

ls -ltR | grep -v '2011-05' | grep -v '2011-06' | grep -v '2011-07' | grep -v '2011-08
share|improve this question
up vote 22 down vote accepted

One solution is: find -type f -mtime 90

That finds files that was last modified exactly 90 days ago.

find -type f -mtime -90 finds files that were modified in last 90 days.

share|improve this answer

As @hknik says, the -mtime operation on find is likely your best bet, but if you want to get all files around three months ago, then you need a bigger net:

find . -type f -mtime -105 -mtime +77

This will find the regular files in the month surrounding three months ago, between 11 and 15 weeks ago.

share|improve this answer

With zsh and (.m[-|+]n) glob-qualifiers:

print -rl -- *(.m90)

will list files modified exactly 90 days ago,

print -rl -- *(.m-90)

will list files modified in the last 90 days,

print -rl -- *(.m-100m+80)

will list files modified between 80 and 100 days ago.

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.