Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: copying to a deep parallel directory
- X-seq: zsh-users 18103
- From: Peter Stephenson <p.stephenson@xxxxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Re: copying to a deep parallel directory
- Date: Wed, 06 Nov 2013 17:51:15 +0000
- In-reply-to: <XnsA270B0962A6B6davidrayninfocouk@80.91.229.13>
- 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: Samsung Cambridge Solution Centre
- References: <XnsA270B0962A6B6davidrayninfocouk@80.91.229.13>
On Wed, 06 Nov 2013 17:21:23 +0000 (UTC)
zzapper <david@xxxxxxxxxxxxxx> wrote:
> Say I want to copy a file from
>
> /var/www/html/admin/include/
>
> to
>
> /var/www/live/admin/include/
>
> I can of course
>
>
> cd html live
>
> and then I can use $OLDPWD or ~+1
>
> but is there anything niftier?
So we're assuming you're in the former directory...
cp <file> ${PWD/html/live}
This syntax gets a bit messy if you're changing multiple levels
since you need to quote the slashes.
pws
Messages sorted by:
Reverse Date,
Date,
Thread,
Author