ls -A

John Chambers jc at minya.UUCP
Fri Oct 13 09:18:29 AEST 1989


In article <1989Oct7.032907.27496 at rpi.edu>, tale at pawl.rpi.edu (David C Lawrence) writes:
> In <1989Oct6.201107.9465 at eci386.uucp> jmm at 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



More information about the Comp.unix.wizards mailing list