Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!usc!bloom-beacon!hstbme.mit.edu!scs From: scs@hstbme.mit.edu (Steve Summit) Newsgroups: comp.unix.wizards Subject: ls -A (was: Multiple Root ID's considered evil?) Message-ID: <14611@bloom-beacon.MIT.EDU> Date: 25 Sep 89 00:06:40 GMT References: <15@minya.UUCP> Sender: daemon@bloom-beacon.MIT.EDU Reply-To: scs@adam.pika.mit.edu (Steve Summit) Distribution: na Lines: 27 In article <15@minya.UUCP> jc@minya.UUCP (John Chambers) writes: >I won't say what I'd like >to do to the geniuses who decide that commands like ls should behave >differently for user 0 than for all other users. Let's just say that >it has on occasion had some very unpleasant consequences, which wouldn't >have happened if it had ignored the .* files like it's supposed to. >It's especially annoying to think that the little monster wastes cpu >cycles every time it's called, just so it can do this to me.... You mean ls -A is implicit if getuid() returns 0? Funny, I'd never noticed. I _like_ -A; I've essentially got ls aliased to always include it. I've never understood why there would be certain files you never want to see, or why a simple bijection based on the first character of the filename is a useful and general selection model. Selecting a command's operands and restricting its output is what shell metacharacters and grep are for. I think ls should list my directory, not list some of my directory. ("Every function should do exactly one job, and do it well.") The shells conspire with ls to perpetuate this misguided discrimination against "dot" files: it's irritating that I have to type things like rm *~ .*~ to remove _all_ the backup files GNU emacs might have left around. Anyway, getuid() is one of the least expensive system calls known.