From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18293 invoked by alias); 21 Aug 2010 16:08:38 -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: 15312 Received: (qmail 4472 invoked from network); 21 Aug 2010 16:08:37 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,T_TO_NO_BRKTS_FREEMAIL autolearn=ham version=3.3.1 Received-SPF: pass (ns1.primenet.com.au: SPF record at _spf.google.com designates 209.85.215.171 as permitted sender) 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= From: Andrey Borzenkov To: zsh-users@zsh.org Subject: Re: copying a directory to same level Date: Sat, 21 Aug 2010 19:36:35 +0400 User-Agent: KMail/1.13.5 (Linux/2.6.35.2-desktop-1mnb; KDE/4.5.0; x86_64; ; ) Cc: zzapper References: In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1718576.35VxWdENsq"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <201008211936.39179.arvidjaar@gmail.com> --nextPart1718576.35VxWdENsq Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable On Saturday 21 of August 2010 19:12:37 zzapper wrote: > Hi > (Hope this is not too dumb) >=20 > I want to duplicate directory vim73 to vim >=20 > >cp -r vim73 vim/ >=20 > 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 >=20 > 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. --nextPart1718576.35VxWdENsq Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iEYEABECAAYFAkxv8oQACgkQR6LMutpd94w8BQCfSDXoSLYzUCxunnC4wOpvRL3U EjoAn3p4TRbVsK9VyZX1AhmTn0D9PeNW =2owj -----END PGP SIGNATURE----- --nextPart1718576.35VxWdENsq--