On Sat, 16 Jun 2001, Steve O'Hara-Smith wrote:

> On Sat, 16 Jun 2001 14:34:07 +1000 (EST)
> Bruce Evans <[EMAIL PROTECTED]> wrote:

> BE> cp is also broken for symlinks to valid pathnames for nonexistent files;
> BE> 
> BE>     $ rm -f foo
> BE>     $ ln -s /nonesuch foo
> BE>     $ cp foo bar
> BE> 
> BE> This duplicates foo as a symlink, but should just fail.
>       This is correct behaviour IMHO - why on earth should it fail. If I
> copy a directory containing symlinks I don't want them do vanish just because
> the target is unavailable.

Because cp copies file contents, not file nodes (unless the -R flag is
specified).  This is clarified in current POSIX drafts.  gnu cp gets
this right.


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to