bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: symlinks and targets are not the same file


From: Pádraig Brady
Subject: Re: symlinks and targets are not the same file
Date: Sat, 05 Dec 2009 02:07:28 +0000
User-agent: Thunderbird 2.0.0.6 (X11/20071008)

Karl Berry wrote:
> [coreutils 8.1, gnu/linux]
> 
> $ touch foo 
> $ ln -s foo lnk
> $ \cp --no-dereference foo lnk
> cp: `foo' and `lnk' are the same file
> 
> Well, no, they're not.
> I expected the file foo to overwrite the symlink lnk.
> I can imagine that error without --no-dereference, but with it ... ?

As far as I understand it cp -P,--no-deref only applies to the source.
There are different rules for the destination, and you would
need to be explicit with --remove-dest for example.

cheers,
Pádraig.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]