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

> On Sat, 16 Jun 2001 17:27:00 +1000 (EST)
> Bruce Evans <[EMAIL PROTECTED]> wrote:
> 
> 
> BE> >         This is correct behaviour IMHO - why on earth should it fail. If I
> BE> > copy a directory containing symlinks I don't want them do vanish just because
> BE> > the target is unavailable.
> BE> 
> BE> Because cp copies file contents, not file nodes (unless the -R flag is
> BE> specified).  This is clarified in current POSIX drafts.  gnu cp gets
> BE> this right.
> 
>       *WHAT*, let me get this straight POSIX drafts now suggest that cp *should*
> turn a symlink into a file ? I truly dread to think how much that would break.

cp always did this (except in the broken case of a broken symlink).  POSIX
just clarifies it.  From the FreeBSD manpage for cp(1):

     -R    If source_file designates a directory, cp copies the directory and
           the entire subtree connected at that point.  This option also
           causes symbolic links to be copied, rather than indirected through,
           ...

     Symbolic links are always followed unless the -R flag is set, in which
     case symbolic links are not followed, by default. ...

>       Please tell me I have the wrong end of the stick here, failing that someone
> please tell me that FreeBSD will not follow this madness.

You have the wrong end of the stick :-).

>       Hang on, the target of a symlink *is* the content of the symlink not the
> content of the file that may or may not be at the target. At least it always used
> to be that way.

No.  Wrong end...

Bruce


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

Reply via email to