Path: utzoo!attcan!lsuc!eci386!ecicrl!clewis From: clewis@ecicrl.UUCP (Chris Lewis) Newsgroups: comp.unix.wizards Subject: Re: ls -A Message-ID: <698@ecicrl.UUCP> Date: 8 Oct 89 20:43:30 GMT References: <15@minya.UUCP> <14611@bloom-beacon.MIT.EDU> <1989Oct6.201107.9465@eci386.uucp> <1989Oct7.032907.27496@rpi.edu> Reply-To: clewis@ecicrl.UUCP (Chris Lewis) Distribution: na Organization: Elegant Communications Inc., Ferret Division, Toronto, Canada Lines: 31 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. I think you missed the point. If "*" expanded to include all . files, by the principle of least surprise, then every utility would *have* to *try* to act on "." and "..". Eg: ed (oof!), cat (ugh!), tar (ouch!), and unlink (YIPES!) Special casing "." files at command interpreter level is analogous to features in a lot of other operating systems. Eg: minidisk extension 0 in VM/CMS (ala PROFILE EXEC A0). I suspect that when this portion of the file system was designed, and directory self and parent links were thought out, the idea of using the "." prefix to *generally* hide files lit the proverbial light bulb as a nice touch "serendipity-wise". Almost 20 years later it still sounds like a good idea.... Special casing "ls -A" for root is a botch though. -- Chris Lewis, Elegant Communications Inc. UUCP: {uunet!mnetor, utcsri!utzoo, uunet!attcan!lsuc, yunexus}!ecicrl!clewis Moderator of the Ferret Mailing List (ferret-request@eci386) Phone: (416)-294-9253