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 03:55 PM
Find command with prune and exec options Sebarry UNIX for Dummies Questions & Answers 2 06-19-2006 05:07 AM
Find command with prune and exec Sebarry UNIX for Advanced & Expert Users 1 06-18-2006 02:43 PM
Use -prune with find command on AIX FuzzySlippers UNIX for Dummies Questions & Answers 5 11-08-2002 09:24 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 05-25-2007
venu_nbk venu_nbk is offline
Registered User
  
 

Join Date: Jul 2006
Posts: 33
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
  #2 (permalink)  
Old 05-25-2007
as78 as78 is offline
Registered User
  
 

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

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

Join Date: May 2007
Posts: 36
Try this

find . ! -path "./logs*" -type f -exec cp {} /destination/directory \;
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 02:23 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0