The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


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 !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Find command uisng -prune or -only 2reperry UNIX for Advanced & Expert Users 7 02-22-2008 11:55 AM
Find command with prune and exec options Sebarry UNIX for Dummies Questions & Answers 2 06-19-2006 01:07 AM
Find command with prune and exec Sebarry UNIX for Advanced & Expert Users 1 06-18-2006 10:43 AM
Use -prune with find command on AIX FuzzySlippers UNIX for Dummies Questions & Answers 5 11-08-2002 05:24 AM

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-25-2007
Registered User
 

Join Date: Jul 2006
Posts: 32
find command with prune help

I have a directory named https-abcd
Under that I have some directories, files and links.
One of those directories is with name logs and the logs directory has lot of files in it.
I need to tar the whole https-abcd directory excluding the logs directory only, I should get all the links, files and directories in the tar.

I am trying this command

pwd
/fs1/links/https-abcd

find . \( ! -name "logs" \) -type f -exec cp {} /destination/directory \;

But this is not working for the copy atleast. Could any one help me out please
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 05-25-2007
Registered User
 

Join Date: May 2007
Posts: 2
Try find ./ -type f -exec cp {} /destination/directory/ \;

Last edited by as78; 05-25-2007 at 01:12 PM.
Reply With Quote
  #3 (permalink)  
Old 05-28-2007
praveenkumar_l's Avatar
Registered User
 

Join Date: May 2007
Posts: 36
Try this

find . ! -path "./logs*" -type f -exec cp {} /destination/directory \;
Reply With Quote
Google UNIX.COM
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 01:28 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0