Thread: find command
View Single Post
  #3 (permalink)  
Old 05-09-2008
royalibrahim royalibrahim is offline
Registered User
 

Join Date: Jun 2007
Posts: 60
Quote:
Originally Posted by jim mcnamara View Post
One way
[code]
find . -name 'some_MAY_1*' |\
while read file
do
cp $file /path/to/destination/
done [code]
can be done as short as
Code:
find . -name 'some_MAY_1*' -exec cp {} /path/to/destination \;
if it's a directory, use 'cp -r'
Reply With Quote