Subject: bug#17103: regression: cp -al doesn't copy symlinks, but tries to link to them (fail)

From: Eric Blake <[email-masked]>
Date: Wed, 26 Mar 2014 15:05:56 -0600

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