From: "Michael Paoli" <michael1cat@yahoo.com>
Subject: Re: ln -fs under 5.1B2
Date: 23 Dec 2005 12:58:07 -0800 [thread overview]
Message-ID: <1135371487.291805.206860@g44g2000cwa.googlegroups.com> (raw)
In-Reply-To: 1134164929.274050.17080@g47g2000cwa.googlegroups.com
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/009695399/utilities/ln.html
http://www.gnu.org/software/fileutils/doc/manual/html/fileutils.html#ln%20invocation
http://docs.sun.com/app/docs/doc/816-5165/6mbb0m9kh?a=view#ln-1-indx-1
prev parent reply other threads:[~2005-12-23 20:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-09 21:48 ln -fs under 5.1B2 camelma
2005-12-23 20:58 ` Michael Paoli [this message]
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox