Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Copying certain subdirectories retaining structure



lilydjwg <lilydjwg@xxxxxxxxx> wrote in news:20140223071542.GA25203
@lilyforest:

> On Sat, Feb 22, 2014 at 08:06:32PM +0000, zzapper wrote:
>> I want to copy all files in subdirectories named /good/ to a USB while 
>> retaining directory structure
>> 
>> /aaa/pic/good
>> /aan/dogs/good/
>> /dir1/dir2/dir3/good/
> 
> I always find tar is great for copying lots of files:
> 
> tar c **/good(/) | tar xv -C /media/usbkey
> 
The 3 answers demonstrate the versatility of *nix.

thanks!


-- 
zzapper
https://twitter.com/dailyzshtip

---
This email is free from viruses and malware because avast! Antivirus protection is active.
http://www.avast.com




Messages sorted by: Reverse Date, Date, Thread, Author