[X-Unix] find and (c|m)time

TjL luomat at gmail.com
Sat Mar 28 16:00:50 PDT 2009


If I am looking for files in a specific folder which were CREATED more
than 24 hours ago, should I be using

find . -type f -ctime +1 -print

or

find . -type f -mtime +1 -print

AFAICT, 'atime' is reset by using 'find' itself, which I don't want.

For as long as I've used Un*x, you'd think I'd know this one, but I'm not sure.

     -ctime n
             True if the difference between the time of last change of
file status information and
             the time find was started, rounded up to the next full
24-hour period, is n 24-hour
             periods.

     -mtime n
             True if the difference between the file last modification
time and the time find was
             started, rounded up to the next full 24-hour period, is n
24-hour periods.

If I had to guess I'd guess 'ctime' but I thought I'd ask you fine folks.

Thanks!

TjL


More information about the X-Unix mailing list