Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!munnari!mwp From: mwp@munnari.oz (Michael W. Paddon) Newsgroups: comp.unix.wizards Subject: Re: Symbolic Links Message-ID: <1820@munnari.oz> Date: Thu, 10-Sep-87 22:42:28 EDT Article-I.D.: munnari.1820 Posted: Thu Sep 10 22:42:28 1987 Date-Received: Sat, 12-Sep-87 16:07:37 EDT References: <2934@ulysses.homer.nj.att.com> Organization: Comp Sci, Melbourne Uni, Australia Lines: 62 in article <2934@ulysses.homer.nj.att.com>, ekrell@hector..UUCP (Eduardo Krell) says: > 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. The point of my example was a simple everyday situation. You cd to a directory and find it empty. You then cd .. and rmdir the said directory. This will always work under BSD -- your system will sometimes have the user trying to rmdir a symlink. The user doesn't need to use lstat under BSD. > And I guess I can now dismiss your examples as meaningless with the idea > that /foo/bar/.. == /foo ? This seems to be the essence of the problem. People want the best of both schemes. I don't particularily like the solution of a per-process flag. > >>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. OK then, the semantics of "ls .." are what's really annoying you! It doesn't change my observations. > 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. This appears to make each scheme equally flawed! As I stated previously, now might be the time to be radical and attempt to redesign the UNIX file system from scratch. > "cd .." can be "fixed" in the shell (see above). "ls .." can't, and I > believe "ls .." should be equivalent to "cd ..; ls" Any occurence of ".." in a shell command may be fixed at the shell level to the way you want things to work. Obviously. The question is should the kernel be changed? Most of your arguments for the changes have hinged on user level examples. Is it desirable to force these changes on the kernel as well? Until you can *prove* that necessity it is probably an unwise move given the support for the existing scheme. Remember that if you hack your shell, you can't possibly break existing code. mwp === PS. Everyone else on the network is probably getting *very* tired of this subject by now. I am, however, genuinely interested in continuing this discussion by mail. =========================== UUCP: {seismo,mcvax,ukc,ubc-vision}!munnari!mwp ARPA: mwp%munnari.oz@seismo.css.gov CSNET: mwp%munnari.oz@australia