Symlinks and ..

Peter da Silva peter at ficc.uu.net
Thu Nov 23 09:51:16 AEST 1989


[ re: file systems treating .. as an operator rather than a link ]

In article <10168 at alice.UUCP> ark at alice.UUCP (Andrew Koenig) writes:
> Suppose, for instance, that a directory has subdirectories foo
> and bar and a file in foo says  #include "../foo/x.h" .  It is
> important to be certain that the x.h included is really the one
> in the foo subdirectory.

This isn't a problem. "../foo/x.h" would work. It's the component *before*
the ".." that gets eaten, not the one after it.

Say you're in "/u/ark/bar", then "../foo/x.h" becomes "/u/ark/bar/../foo/x.h",
which becomes "/u/ark/foo/x.h".

The Amiga file system does this, by the way. I think it's more trouble
than it's worth.
-- 
`-_-' Peter da Silva <peter at ficc.uu.net> <peter at sugar.lonestar.org>.
 'U`  --------------  +1 713 274 5180.
"The basic notion underlying USENET is the flame."
	-- Chuq Von Rospach, chuq at Apple.COM 



More information about the Comp.unix.questions mailing list