www.delorie.com/gnu/docs/findutils/find_15.html   search  
 
Buy GNU books!


Finding Files

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

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.

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. For example, to list files in `/u/bill' that were last read from 2 to 6 hours 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


  webmaster   donations   bookstore     delorie software   privacy  
  Copyright © 2003   by The Free Software Foundation     Updated Jun 2003