Date: Sat, 16 Jun 2001 17:27:00 +1000 (EST) From: Bruce Evans <bde@zeta.org.au> To: "Steve O'Hara-Smith" <steveo@eircom.net> Cc: david@catwhisker.org, current@FreeBSD.ORG Subject: Re: symlink(2) [Was: Re: tcsh.cat] Message-ID: <Pine.BSF.4.21.0106161704180.90711-100000@besplex.bde.org> In-Reply-To: <20010616085651.29684596.steveo@eircom.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 16 Jun 2001, Steve O'Hara-Smith wrote: > On Sat, 16 Jun 2001 14:34:07 +1000 (EST) > Bruce Evans <bde@zeta.org.au> 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. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0106161704180.90711-100000>