![]() |
|
|
|
|
|||||||
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| find & copy files with absolute path | jagnikam | Shell Programming and Scripting | 15 | 05-15-2008 03:00 PM |
| need to help to find and copy to a file | pujars1 | UNIX for Dummies Questions & Answers | 2 | 07-12-2007 06:56 AM |
| find files and copy into a directory | balireddy_77 | Shell Programming and Scripting | 4 | 04-27-2007 12:38 AM |
| Find directories not containing foo, and copy foo to them | dkaplowitz | Shell Programming and Scripting | 6 | 06-29-2005 05:50 AM |
| find and copy string in a file | vascobrito | UNIX for Advanced & Expert Users | 10 | 03-03-2004 10:14 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
|||
|
HOw to find and copy
Hi,
I need to find files in a directory, between dates like 4/15/06 and 5/02/06, and copy them to a different directory. Is there a way to doa find and a copy together? Thanks, Neil |
| Forum Sponsor | ||
|
|
|
|||
|
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
|
|||
| Google UNIX.COM |
| Thread Tools | |
| Display Modes | |
|
|