[KLUG Members] find a file by date
    Todd Pillars 
    todd at terralabs.com
       
    Wed Dec  8 14:10:26 EST 2004
    
    
  
Quoting John Pesce <pescej at sprl.db.erau.edu>:
> how can I print a list of files, under a tree, with full path that have
> the same date as a particular file, when I do ls -l ?
> 
> i.e. 
> 
> > ls -l 
> rw-r--r--    1 user   staff        4136 Nov 19 2001 record5.dat
> 
> 
> I want something like the output of "find /usr/local -depth" for all
> files under /usr/local with dates of Nov 19 2001
find /usr/local/ -ls -type f | grep -e "Nov 19  2001"
worked for me. But there is a gotcha! - if the day is one digit then there are
two spaces between the month and day instead of one space. There are always 2
spaces between the day and month.
This could be taken care of with a proper regexp 
Todd
    
    
More information about the Members
mailing list