From: "Benjamin R. Haskell" <zsh@benizi.com>
To: zzapper <david@tvis.co.uk>
Cc: zsh-users@zsh.org
Subject: Re: copying a directory to same level
Date: Sun, 22 Aug 2010 14:32:46 -0400 (EDT) [thread overview]
Message-ID: <alpine.LNX.2.01.1008221419180.4535@hp> (raw)
In-Reply-To: <Xns9DDBA4E47D3B3zzappergmailcom@80.91.229.10>
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
--
Best,
Ben
next prev parent reply other threads:[~2010-08-22 18:38 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-21 15:12 zzapper
2010-08-21 15:33 ` Mikael Magnusson
2010-08-21 15:36 ` Andrey Borzenkov
2010-08-21 16:12 ` Bart Schaefer
2010-08-22 12:51 ` zzapper
2010-08-22 18:32 ` Benjamin R. Haskell [this message]
2010-08-22 18:36 ` Benjamin R. Haskell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.LNX.2.01.1008221419180.4535@hp \
--to=zsh@benizi.com \
--cc=david@tvis.co.uk \
--cc=zsh-users@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).