The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #2 (permalink)  
Old 05-18-2006
jim mcnamara jim mcnamara is offline Forum Staff  
...@...
  
 

Join Date: Feb 2004
Location: NM
Posts: 5,800
You need to work out the -mtime +<days> and -mtime -<days>
The +<days> = older than, -<days> = younger than


Code:
find /path/to/files -mtime -30 -mtime +13 -print | \
while read file
do
     cp  "$file"  /new/path/`basename "$file"`
done

You may want to mess around with just the first line, until it prints the correct files for you.