GNU bug report logs -
#15173
[cp] --link overrides dereference settings
Previous Next
Reported by: Gian Piero Carrubba <gpiero <at> rm-rf.it>
Date: Fri, 23 Aug 2013 21:55:02 UTC
Severity: normal
Tags: fixed
Merged with 23120
Done: Bernhard Voelker <mail <at> bernhard-voelker.de>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
* [Thu, Oct 31, 2013 at 02:54:59PM +0100] Gian Piero Carrubba:
>>I've just now read POSIX for cp, and it states:
>>
>>"If the -R option was not specified, cp shall take actions based on the type
>> and contents of the file referenced by the symbolic link, and not by the
>> symbolic link itself, unless the -P option was specified."
>>
>>This suggests that -HL should only be significant with -R ?
>>That is a bit surprising TBH. What do you think Eric?
>
>Oh well, didn't read it like this. My opinion was, and still is even
>if not strong as before, that explicitly using -H/L/preserve=links
>would override that _default_ behaviour.
Sorry, fast reading got me confused.
Yes, my opinion is that the default behaviour (i.e.: when not using -P
or --preserve=links) should be to dereference the symlink. This does not
mean that -HL are not significant without -R, as for what I remember
about parameters order:
cp -P -L
should dereference the symlinks.
Ciao,
Gian Piero.
This bug report was last modified 6 years and 206 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.