ls -A (was: Multiple Root ID's considered evil?)

Steve Summit scs at hstbme.mit.edu
Mon Sep 25 10:06:40 AEST 1989


In article <15 at minya.UUCP> jc at 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.



More information about the Comp.unix.wizards mailing list