Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: replace all versions of a file in hierachy with a more recent version
- X-seq: zsh-users 10383
- From: zzapper <david@xxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: replace all versions of a file in hierachy with a more recent version
- Date: Fri, 16 Jun 2006 13:21:55 +0000 (UTC)
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- Organization: SuccessTheory
- References: <Xns97E48B452D0F7zzappergmailcom@xxxxxxxxxxx> <200606161249.k5GCnXdp009969@xxxxxxxxxxxxxx>
- Sender: news <news@xxxxxxxxxxxxx>
Peter Stephenson <pws@xxxxxxx> wrote in
news:200606161249.k5GCnXdp009969@xxxxxxxxxxxxxx:
> zzapper wrote:
>> I want to replace all versions of a file in hierachy with a more
>> recent version
>
> Depending on what the criterion is for files that need replacing,
>
> for f in oldlocation/**/*(.); do
> cp newlocation${f##oldlocation} $f
> done
>
> pws
>
PWS,
Wouldn't a find be better?
> To access the latest news from CSR copy this link into a web browser:
> http://www.csr.com/email_sig.php
>
--
http://successtheory.com/tips/ Vim, Zsh, MySQL Tips
Messages sorted by:
Reverse Date,
Date,
Thread,
Author