| Michael Paoli 2005-12-23, 5:55 pm |
| camelma@gmail.com wrote:
> # ls -l openv
> lrwxrwxrwx 1 root system 16 Oct 3 10:47 openv ->
> /usr/local/openv
> # ln -fs /usr/local/openv6_0 openv
> # ls -l openv
> lrwxrwxrwx 1 root system 16 Oct 3 10:47 openv ->
> /usr/local/openv
>
> tried also with fullpath and no luck either if that matters.
>
> why ln -fs doesn't work ??
Perhaps unfortunately, ln -sf behavior can vary depending on
implementations. Most notably, in the case of:
ln -sf source target
if target is a symbolic link which when dereferenced refers to a
directory, the behavior may be either of:
target is unlinked, and symbolic link from target to source is
created, or
symbolic link is created within directory target dereferences to, as a
symbolic link to source and having as name the basename of source.
At least at first glance/reading, I found the UNIX (POSIX, etc.)
specification a bit ambiguous in this regard. It specifies what
happens when target is a "file" ... without - at least within that
section of the documentation, unambiguously defining what is meant by
"file" (e.g., in that context, is a symbolic link which dereferences
to a directory, a "file", or not?). Some UNIX/LINUX/BSD/... flavors
have options and/or alternative implementations (e.g. more than one
ln command) which can be used in such a case to either dereference
target and treat it like it's a directory, or not dereference it, and
treat it like a file (and unlink the original target).
references:
http://www.opengroup.org/onlinepubs...ilities/ln.html
http://www.gnu.org/software/fileuti...ln%20invocation
http://docs.sun.com/app/docs/doc/81...iew#ln-1-indx-1
|