Next: , Up: Time



2.3.1 Age Ranges

These tests are mainly useful with ranges (+n and -n).

— Test: -atime n
— Test: -ctime n
— Test: -mtime n

True if the file was last accessed (or its status changed, or it was modified) n*24 hours ago. The number of 24-hour periods since the file's timestamp is always rounded down; therefore 0 means “less than 24 hours ago”, 1 means “between 24 and 48 hours ago”, and so forth.

— Test: -amin n
— Test: -cmin n
— Test: -mmin n

True if the file was last accessed (or its status changed, or it was modified) n minutes ago. These tests provide finer granularity of measurement than -atime et al., but rounding is done in a similar way. For example, to list files in /u/bill that were last read from 2 to 6 minutes ago:

          find /u/bill -amin +2 -amin -6
     
— Option: -daystart

Measure times from the beginning of today rather than from 24 hours ago. So, to list the regular files in your home directory that were modified yesterday, do

          find ~ -daystart -type f -mtime 1
     

The -daystart option is unlike most other options in that it has an effect on the way that other tests are performed. The affected tests are -amin, -cmin, -mmin, -atime, -ctime and -mtime.