Path: utzoo!attcan!uunet!munnari!basser!john From: john@basser.oz (John Mackin) Newsgroups: comp.unix.wizards Subject: Re: fixing rm * (was: Worm/Passwords) Summary: Aaaaaargh! Message-ID: <1615@basser.oz> Date: 16 Nov 88 14:10:12 GMT References: <22401@cornell.UUCP> <4627@rayssd.ray.com> <8563@rpp386.Dallas.TX.US> <125@embossed.UUCP> <672@quintus.UUCP> <1232@atari.UUCP> Organization: Dept of Comp Sci, Uni of Sydney, Australia Lines: 40 In article <1232@atari.UUCP> achar@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@basser.oz.AU (john%basser.oz.AU@UUNET.UU.NET) {uunet,mcvax,ukc,nttlab}!munnari!basser.oz!john