Date: Thu, 4 Jan 2001 08:17:05 GMT From: Cliff Sarginson <cliff@raggedclown.net> To: cjclark@alum.mit.edu, groggy@iname.com, freebsd-questions <questions@FreeBSD.ORG> Subject: Re: ln bug? Message-ID: <E14E5a5-0004FL-00@post.mail.nl.demon.net>
next in thread | raw e-mail | index | archive | help
> On Wed, Jan 03, 2001 at 11:38:39PM +0000, groggy@iname.com wrote: > > is this a bug in "ln"? > > > > if i am in a directory with a file xxx: > > > > ln -s xxx /tmp/xxx > > > > will create link /tmp/xxx, but it will point to itself in /tmp. > > ln is not pointing the link to to xxx in the current directory > > as specified/intended on the command line. doesn't seem right. > > No, that's right. When making symbolic links, the first argument is > the _string_ that the link points to. It is better to not think of > symbolic links pointing to a specific file. Rather, when a symbolic > link is processed as part of a path, the string value of the link is > substituted. > -- > Crist J. Clark cjclark@alum.mit.edu That is a neat explanation for something that can be quite difficult to explain! It might be worth pointing out to people getting their head around this for the first time that the "_string_" may not necessarily exist as a file, symbolic links can "point" to thin air. This is particularly irritating for bad typists... Cliff To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E14E5a5-0004FL-00>