Path: utzoo!utgpu!attcan!uunet!munnari.oz.au!mudla!ok From: ok@mudla.cs.mu.OZ.AU (Richard O'Keefe) Newsgroups: comp.unix.questions Subject: Symlinks and .. Message-ID: <2755@munnari.oz.au> Date: 20 Nov 89 06:21:45 GMT Sender: news@cs.mu.oz.au Lines: 20 This isn't a question, it's a tip. I have a program which normalises file names so that I can tuck them away in a safe place and use them again later even if I'm in a different directory &c &c. One thing that this program did was to change //.. to The way I handled things like "../../rule" was to prepend the current directory and then just apply this rule, so e.g. /tip/ok/../../vmunix -> /vmunix THIS WAS A MISTAKE. The rule is INVALID when / is a symlink. In my case, there is some piece of black magic so that /tip/ok is really /mount/mullauna/tip/ok so that everything else in the system thinks that /tip/ok/../../vmunix -> /mount/mullauna/vmunix I am less found of symlinks than I used to be.