Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rutgers!mtune!jhc From: jhc@mtune.ATT.COM (Jonathan Clark) Newsgroups: comp.unix.wizards Subject: Re: symbolic links Message-ID: <1101@mtune.ATT.COM> Date: Tue, 23-Jun-87 23:12:41 EDT Article-I.D.: mtune.1101 Posted: Tue Jun 23 23:12:41 1987 Date-Received: Thu, 25-Jun-87 04:35:42 EDT References: > <2211@bunker.UUCP> <1097@mtune.ATT.COM> <21681@sun.uucp> Reply-To: jhc@mtune.UUCP (Jonathan Clark) Organization: AT&T ISL Middletown NJ USA Lines: 37 Keywords: symbolic links >> if I say 'cd a/b/c/d/e;cd ..' then I am now in a/b/c/d, regardless of how >> many symlinks or networked file systems I had to go through to get there. >Which can, in most cases, be done by the shell interpreting the "cd" >command; the question is whether one should add extra stuff to the >kernel to make this work invisibly? I tend to agree with what was >given as Dennis Ritchie's position, which was "no". I'd disagree. Yes, I realize that the kernel would then have to keep track of where you are in the file system, that's unfortunate. However, adhering to this does maintain the tree-structure of the current file system. I would also argue that when 'cd'ing through hard-linked directories then the kernel should, following the same model, keep track of how you got there. There has to be a Buckeroo Banzai quote in there somewhere. symlinks are then available to be used as methods of mapping /usr/src into /big-file-server/usr/src, thus hiding icky details of which file systems are where on an extended system or set of systems from the user. Which is not to say that they can't be used for other things. The model given above does modify the concept of 'absolute position in the file system', but I was unable in 30 seconds or so to work out what if anything this might break. Loop-detecting 'find's, possibly, but they should be easily modified (also they are fairly new). In fact, if anything they should be easier to write, since to detect a loop one only has to keep the duple for each ancestor directory, and compare the current two values. A match equals a loop. How would a loop-detecting 'find' work over a symlink if `pwd` returned the position relative to the mount point of the file system? This is not thoroughly thought out, I admit, so go ahead and shoot me down. -- Jonathan Clark [NAC,attmail]!mtune!jhc An Englishman never enjoys himself except for some noble purpose.