Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!uakari.primate.wisc.edu!ginosko!uunet!bloom-beacon!spdcc!ima!minya!jc From: jc@minya.UUCP (John Chambers) Newsgroups: comp.unix.wizards Subject: Re: ls -A Message-ID: <36@minya.UUCP> Date: 12 Oct 89 23:18:29 GMT References: <15@minya.UUCP> <14611@bloom-beacon.MIT.EDU> <1989Oct7.032907.27496@rpi.edu> Distribution: na Organization: home Lines: 28 In article <1989Oct7.032907.27496@rpi.edu>, tale@pawl.rpi.edu (David C Lawrence) writes: > In <1989Oct6.201107.9465@eci386.uucp> jmm@eci386.uucp (John Macdonald) writes: > John> Like all things, treating .* files specially has advantages and > John> disadvantages. Some form of special treatment *was* necessary - > John> otherwise "rm *" would remove "." and ".."! > > No it wouldn't. rm already does special treatment of `.' and `..'. > Some form of special treatment by shell expansion of * wasn't > "necessary" at all. Which brings up a point that seems to have been missed. The special treatment of filenames starting with '.' isn't done by the kernel; it is done by the shell. The shell isn't a hard-wired part of Unix. One of the standard rejoinders to this sort of complaint is "If you don't like the way the shell does it, write your own." Granted, there's a small bit of facetiousness in this. The Bourne shell is effectively a mandatory part of a deliverable Unix system. But the basic point still stands: The interpretation of '.' isn't done at the lowest levels; it is done at a high level, in the command interpreter, and in a few utilities like ls. It's not hard to write utilities that follow other rules. Go ahead; it's fun... -- #echo 'Opinions Copyright 1989 by John Chambers; for licensing information contact:' echo ' John Chambers <{adelie,ima,mit-eddie}!minya!{jc,root}> (617/484-6393)' echo '' saying