Finding folders that contain changed files since date

3

1

So, I have a directory with lots of sub-directories Something like...

main
main/folder1
main/folder2
main/folder2/otherfolder1
main/folder2/otherfolder2

etc...

Is there an easy way for me to determine which folders have files in them that have been changed since a particular date?

I'd want to know that

folder1
otherfolder2

Are the only two folders that have changed files since 7/15/09.

Anything simple will work for me...applescript, terminal command.

Jason

Posted 2009-08-01T14:58:15.930

Reputation: 1 029

Answers

4

find . -type d -newermt '7/15/09'

From the find man page:

-newerXY file

True if the current file has a more recent last access time (X=a), inode creation time (X=B), change time (X=c), or modification time (X=m) than the last access time (Y=a), inode creation time (Y=B), change time (Y=c), or modification time (Y=m) of file. In addition, if Y=t, then file is instead interpreted as a direct date specification of the form understood by cvs(1). Note that -newermm is equivalent to -newer.

Richard Hoskins

Posted 2009-08-01T14:58:15.930

Reputation: 10 260

1

This article shows how this can be done using find in terminal. For more information on find open a terminal and use

man find

BinaryMisfit

Posted 2009-08-01T14:58:15.930

Reputation: 19 955