Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: copying a directory to same level
- X-seq: zsh-users 15312
- From: Andrey Borzenkov <arvidjaar@xxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Re: copying a directory to same level
- Date: Sat, 21 Aug 2010 19:36:35 +0400
- Cc: zzapper <david@xxxxxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:subject:date :user-agent:cc:references:in-reply-to:mime-version:content-type :content-transfer-encoding:message-id; bh=EoRUakYLDKwgfpCfqlTt/URvHBsxk0FeeNcBUNItwyg=; b=jWgHovB/maIreaem/Kg8sPT+nf50qltniMS9UOzuZ1B07DbZqN2ZNtnLKDOUrADksb /X48GEObG9SVKbBCVbtRRVbX7VM3XymEO+rLhabfK6b0JgnrSTXnZibrqGt4zaYAJHKJ gYyvIKMG2pxjqGfNZq+HVBPZve9YZIgkFAoLA=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:subject:date:user-agent:cc:references:in-reply-to :mime-version:content-type:content-transfer-encoding:message-id; b=ljcEkT+B6mgCz+nkmhlqrhOK9HU+gY/oQ1mlkRc55MVHHO4O73HTz9J/ldHYAdMiCR cM4+il3o3ivGZIIfgdjUGhEO6H64JODEllNzyekoX7y39kqAWZyuUI/bWzFaFr3kTfHi Ufh3Mc6uM7V0TBySRawxwX4RqtxCQFaeazhfQ=
- In-reply-to: <Xns9DDBA4E47D3B3zzappergmailcom@xxxxxxxxxxxx>
- 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
- References: <Xns9DDBA4E47D3B3zzappergmailcom@xxxxxxxxxxxx>
On Saturday 21 of August 2010 19:12:37 zzapper wrote:
> Hi
> (Hope this is not too dumb)
>
> I want to duplicate directory vim73 to vim
>
> >cp -r vim73 vim/
>
> if directory vim does not exist then it does what I want.
> However if vim/ already exists then vim73/ will be created as a
> sub-directory in vim/ eg vim/vim73
>
> Can you explain this behaviour
This is how cp command works and is unrelated to shell.
> and how can I force it duplicate to
> same level regardless of whether directory exists
GNU cp has -T option that does exactly what you want.
Attachment:
signature.asc
Description: This is a digitally signed message part.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author