List of Recently Modified Files

One solution is: find . -type f -mtime 90

That finds files that was last modified 90 days ago (in those 24 hours that started 91 x 24 hours ago and ended 90 x 24 hours ago).

find . -type f -mtime -90 finds files that were modified in the last 90 days (or in the future).

find . -type f -mtime +90 finds files that were modified at least 91 days ago (at least in POSIX compliant find implementations).


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 +76

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

(note the 76 instead of 7 x 11 = 77, as you want files whose age rounded down to an integer number of days is strictly greater than 76 to get files that are at least 77 days (11 weeks) old).


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

print -rl -- *(.m90)

will list files modified 90 days ago (in those 24 hours that started 91 x 24 hours ago and ended 90 x 24 hours ago like with POSIX find -mtime 90).

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

will list files modified in the last 90 days (or in the future),

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

will list files modified between 91 and 100 days ago.

Tags:

Date

Find

Ls

Files