fixing rm * (was: Worm/Passwords)

John Mackin john at basser.oz
Thu Nov 17 00:10:12 AEST 1988


In article <1232 at atari.UUCP> achar at atari.UUCP (Alan Char) writes:

> Actually, you can change the shell.  (Nowadays, that's more like three to
> five things.)  For example, I would REALLY appreciate in csh a variable
> 
> 	set expandcheck=5
> 
> So that if some shell expansion expanded to more than 5 things, it would
> prompt for confirmation:
> 
> 	% rm * .o
> 	*: matches 400 files, are you sure?
> 
> Comments on this idea?  --Alan

My basic comment is `Oh, no!!!'

The point about any hack that is supposed to make mistakes in
command lines, say rm command lines, less dangerous is that it's
just fine as long as the people who are going to use it are never,
at any time in the future, going to use a different UNIX system on
which the hack doesn't exist.  When they do, they will get into
big trouble, because they won't be used to being careful with
`dangerous' commands, like rm; they'll expect the system to
babysit them, and it won't, just like it never should have in
the first place.

I know systems where rm is interactive by default.  I've personally
seen plenty of users on such systems whose habitual way of cleaning
up a directory was `rm *'.  How much trouble will they be in when
they go somewhere else that runs a _real_ rm command?

Hacks like this are a _terrible_ idea.  Please do not
implement such things.

John Mackin, Basser Department of Computer Science,
             University of Sydney, Sydney, Australia

john at basser.oz.AU (john%basser.oz.AU at UUNET.UU.NET)
{uunet,mcvax,ukc,nttlab}!munnari!basser.oz!john



More information about the Comp.unix.wizards mailing list