Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Copying certain subdirectories retaining structure
- X-seq: zsh-users 18503
- From: zzapper <david@xxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Re: Copying certain subdirectories retaining structure
- Date: Sat, 22 Feb 2014 22:02:46 +0000 (UTC)
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- Organization: Your Company
- References: <XnsA2DCCC96A9968davidrayninfocouk@80.91.229.13> <1393105212.21091.2.camel@air.home.fifi.org>
Philippe Troin <phil@xxxxxxxx> wrote in
news:1393105212.21091.2.camel@xxxxxxxxxxxxxxxxx:
>
> for i in **/good(/)
> do
> dest=/media/usbkey/$i
> mkdir -p $i:h
> cp -a $i /media/usbkey/$i
> done
>
> Phil.
Looks good . the clever bit is the mkdir -p $i:h
--
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