GNU bug report logs - #17103
cp: "cp -al" doesn't copy symlinks, tries to link to them

Previous Next

Package: coreutils;

Reported by: Linda Walsh <coreutils <at> tlinx.org>

Date: Wed, 26 Mar 2014 18:09:01 UTC

Severity: normal

Full log


Message #23 received at 17103 <at> debbugs.gnu.org (full text, mbox):

From: Eric Blake <eblake <at> redhat.com>
To: Linda Walsh <coreutils <at> tlinx.org>
Cc: 17103 <at> debbugs.gnu.org, Pádraig Brady <P <at> draigBrady.com>
Subject: Re: bug#17103: regression: cp -al doesn't copy symlinks, but tries
 to link to them (fail)
Date: Wed, 26 Mar 2014 15:05:56 -0600
[Message part 1 (text/plain, inline)]
On 03/26/2014 02:57 PM, Linda Walsh wrote:
> Furthermore, the man page says "-l: hard link files instead
> of copying'.  AFAIK, symlinks are not files any more
> than directories (or is that wrong too and they are now
> considered to be 'files'?

Per the POSIX definition, symlinks, directories, FIFOS, and all other
special files are still "files" - the term "file" includes not only
"regular files" but all other named entities in the file system.
Directories are the only special file type that cannot generally be
hardlinked according to POSIX rules (and even then, POSIX allows the
Solaris behavior where the superuser CAN hardlink directories, with the
caveat that doing so causes weird behaviors).

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

[signature.asc (application/pgp-signature, attachment)]

This bug report was last modified 6 years and 158 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.