Bob Proulx wrote:
> Axel Beckert wrote:
> > If I try to copy a symlink which points to a directory, cp refuses to do
> > so without -r despite it copies the symlink itself and not the contents
> > with "cp -r", even if the symlink was given on the commandline without
> > trailing slash:
> 
> Thank you for the bug report.  However I believe this to be correct
> behavior.  The magic option isn't -r.  The magic option is -d.

Ok.

> Symlinks violate some principles of least surprise.  Therefore it is
> no surprise that it is impossible to make all uses of symlinks
> unsurprising.

Hehe.

> The cp documentation says:
> 
>   `-d'
>      Copy symbolic links as symbolic links rather than copying the
>      files that they point to, and preserve hard links between source
>      files in the copies.  Equivalent to `--no-dereference
>      --preserve=links'.
> 
> Therefore the intention is that to copy a symlink as a symlink the -d
> option should be included.  (Note that -d is included in the -a option.)

Ok, accepted. Thanks for your time and explanation. They helped to
understand the issue a lot.

                Regards, Axel
-- 
 ,''`.  |  Axel Beckert <a...@debian.org>, http://people.debian.org/~abe/
: :' :  |  Debian Developer, ftp.ch.debian.org Admin
`. `'   |  1024D: F067 EA27 26B9 C3FC 1486  202E C09E 1D89 9593 0EDE
  `-    |  4096R: 2517 B724 C5F6 CA99 5329  6E61 2FF9 CD59 6126 16B5



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to