From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12955 invoked by alias); 24 Feb 2014 22:33:53 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 18509 Received: (qmail 26014 invoked from network); 24 Feb 2014 22:33:48 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, RCVD_NUMERIC_HELO,SPF_HELO_PASS autolearn=no version=3.3.2 X-Injected-Via-Gmane: http://gmane.org/ To: zsh-users@zsh.org From: zzapper Subject: Re: Copying certain subdirectories retaining structure Date: Mon, 24 Feb 2014 22:33:20 +0000 (UTC) Organization: Your Company Message-ID: References: <20140223071542.GA25203@lilyforest> X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 2.25.243.84 User-Agent: Xnews/2009.05.01 X-Antivirus: avast! (VPS 140224-1, 02/24/2014), Outbound message X-Antivirus-Status: Clean lilydjwg 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