From owner-freebsd-current Sat Jun 16 5:33: 2 2001 Delivered-To: freebsd-current@freebsd.org Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by hub.freebsd.org (Postfix) with ESMTP id 284FE37B401 for ; Sat, 16 Jun 2001 05:32:58 -0700 (PDT) (envelope-from bde@zeta.org.au) Received: from bde.zeta.org.au (bde.zeta.org.au [203.2.228.102]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id WAA28628; Sat, 16 Jun 2001 22:32:48 +1000 Date: Sat, 16 Jun 2001 22:30:58 +1000 (EST) From: Bruce Evans X-Sender: bde@besplex.bde.org To: "Steve O'Hara-Smith" Cc: david@catwhisker.org, current@FreeBSD.ORG Subject: Re: symlink(2) [Was: Re: tcsh.cat] In-Reply-To: <20010616122211.5aadca50.steveo@eircom.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sat, 16 Jun 2001, Steve O'Hara-Smith wrote: > On Sat, 16 Jun 2001 17:27:00 +1000 (EST) > Bruce Evans 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 majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message