From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Thread: fa528,a1cd1eb6f25aff4 X-Google-Attributes: gidfa528,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!g44g2000cwa.googlegroups.com!not-for-mail From: "Michael Paoli" Newsgroups: comp.unix.tru64 Subject: Re: ln -fs under 5.1B2 Date: 23 Dec 2005 12:58:07 -0800 Organization: http://groups.google.com Message-ID: <1135371487.291805.206860@g44g2000cwa.googlegroups.com> References: <1134164929.274050.17080@g47g2000cwa.googlegroups.com> NNTP-Posting-Host: 198.144.194.236 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: posting.google.com 1135371492 5430 127.0.0.1 (23 Dec 2005 20:58:12 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 23 Dec 2005 20:58:12 +0000 (UTC) User-Agent: G2/0.2 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050513 Debian/1.7.8-1,gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: g44g2000cwa.googlegroups.com; posting-host=198.144.194.236; posting-account=TV2Faw0AAADFXel6s7v6f3aip6ZLwfOk Xref: g2news1.google.com comp.unix.tru64:464 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