Symlinks and ..

Richard Tobin richard at aiai.ed.ac.uk
Wed Nov 22 05:39:24 AEST 1989


In article <12407 at ulysses.homer.nj.att.com> ekrell at hector.UUCP (Eduardo Krell) writes:
>".." should be treated as a logical operator that moves you one level
>closer to the root by stripping the last component off your current
>working directory (which is whatever path you used to get to where
>you are). This preserves the "/usr/foo/bar/.. == /usr/foo" paradigm.

Well, that's a nice paradigm to preserve, but another one is that
a directory should be the same however you got there.  Sometimes you
want one, sometimes the other.

(Of course, this isn't a problem of symbolic links per se; hard links
would have the same problem but making hard links to directories is
"discouraged").

I think it's a bad idea for shells (or whatever) to treat ".." as something
special.  It would be better to use a new name ("..." perhaps?).

-- Richard
-- 
Richard Tobin,                       JANET: R.Tobin at uk.ac.ed             
AI Applications Institute,           ARPA:  R.Tobin%uk.ac.ed at nsfnet-relay.ac.uk
Edinburgh University.                UUCP:  ...!ukc!ed.ac.uk!R.Tobin



More information about the Comp.unix.questions mailing list