From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24120 invoked by alias); 22 Aug 2010 18:43:24 -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: 15320 Received: (qmail 2657 invoked from network); 22 Aug 2010 18:43:23 -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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham version=3.3.1 Received-SPF: pass (ns1.primenet.com.au: SPF record at benizi.com designates 64.130.10.15 as permitted sender) Date: Sun, 22 Aug 2010 14:36:42 -0400 (EDT) From: "Benjamin R. Haskell" To: zzapper cc: zsh-users@zsh.org Subject: Re: copying a directory to same level In-Reply-To: Message-ID: References: User-Agent: Alpine 2.01 (LNX 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Sun, 22 Aug 2010, Benjamin R. Haskell wrote: > On Sat, 21 Aug 2010, 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 and how can I force it duplicate to > > same level regardless of whether directory exists > > Personally, I use rsync for anything like this. For your particular use > case, you'd want: > > rsync -r vim73/ vim/ > > Note the trailing slash on vim73/. If you omit it, you'll get a > vim/vim73/ subdirectory. In both cases, though, the final outcome > doesn't depend on whether vim/ already exists. > > > Although, it also sounds suspiciously as though you're trying to go > against recommendations and muck about in the $VIM/ or $VIMRUNTIME/ > directories directly (rather than making modifications in your own home > directory). > > > Or, maybe you're looking for symbolic links. I've seen on many systems: > > /usr/share/vim/current -> vim72 > > Modified for what I assume you might want in your example, that can be > created by: > > ln -s vim73 /usr/share/vim/vim > > Oops, sorry. I was in Vim mailing list mode. I didn't realize this was on Zsh Users. (Nor had I seen the other responses.) The Vim-related advice still stands, though. -- Best, Ben