Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!cmcl2!rutgers!bellcore!faline!ulysses!hector!ekrell From: ekrell@hector..UUCP (Eduardo Krell) Newsgroups: comp.unix.wizards Subject: Re: Symbolic Links Message-ID: <2934@ulysses.homer.nj.att.com> Date: Wed, 9-Sep-87 19:50:12 EDT Article-I.D.: ulysses.2934 Posted: Wed Sep 9 19:50:12 1987 Date-Received: Sat, 12-Sep-87 00:36:15 EDT References: <2931@ulysses.homer.nj.att.com> <1817@munnari.oz> Sender: daemon@ulysses.homer.nj.att.com Reply-To: ekrell@hector (Eduardo Krell) Organization: AT&T Bell Labs, Murray Hill Lines: 54 In article <1817@munnari.oz> mwp@munnari.UUCP writes: (me) >> The original question was about removing a symbolic link, and how >> could you tell the difference between removing the symbolic link and >> the directory it points to. > >The point is that your implementation requires *more* sophistication >form the average user than the BSD one. How many casual users know >what lstat(2) does off the top of their heads? What are you talking about? How can you tell if a file is a symbolic link or not under BSD? That's right, lstat(). There's no other way! The amount of code it would take (or the user-level command) to tell the difference between a plain file/directory and a symbolic link is under our implementation EXACTLY THE SAME AS IN BSD. Period. >Explaining the BSD semantics requires only the model of a global jump >to another part of the tree. Explaining situations which your semantics >lead to requires detailed knowledge of symlinks and the way context can >affect path names. It only requires to know that /foo/bar/.. is the same as /foo (which is the way I thought Unix worked). >But with the idea of global jumps, this example is meaningless. And I guess I can now dismiss your examples as meaningless with the idea that /foo/bar/.. == /foo ? >It seems to me that you are suggesting a change to the kernel because >the semantics of "cd .." don't please you under the BSD system. I made this clear a while ago: I use ksh on BSD, System V and all other Unix systems we run. ksh treats "cd .." the way we propose to. I don't need to "fix" the "cd .." problem, it's already taken care of by ksh. >Your >proposal certainly fixes this behaviour. There seem to be other ramifications >of the scheme that far outweigh the proposed advantages, as has >been pointed out by numerous examples. I think the advantages clearly far outweigh these ramifications. For every example you come up with, I can show you a counter-example which is as simple as yours, in which BSD semantics breaks. >I am not wholly against your ideas -- "cd .." really irks me on occasion. >However, jumping in and changing the kernel may not be the best solution. "cd .." can be "fixed" in the shell (see above). "ls .." can't, and I believe "ls .." should be equivalent to "cd ..; ls" Eduardo Krell AT&T Bell Laboratories, Murray Hill {ihnp4,seismo,ucbvax}!ulysses!ekrell