Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!ukma!rayssd!dhb From: dhb@rayssd.RAY.COM (David H. Brierley) Newsgroups: comp.cog-eng,comp.unix.xenix,comp.unix.wizards Subject: Re: Request for human interface design anecdotes Message-ID: <1689@rayssd.RAY.COM> Date: Mon, 16-Nov-87 12:36:26 EST Article-I.D.: rayssd.1689 Posted: Mon Nov 16 12:36:26 1987 Date-Received: Wed, 18-Nov-87 04:39:19 EST References: <1721@spar.SPAR.SLB.COM> <1621@megatest.UUCP> <101@ateng.UUCP> <1402@cuuxb.ATT.COM> Sender: dhb@rayssd.RAY.COM (David H. Brierley @ Raytheon Company, Portsmouth RI) Reply-To: dhb@rayssd.RAY.COM (David H. Brierley) Organization: Raytheon Company, Portsmouth RI Lines: 31 Xref: mnetor comp.cog-eng:290 comp.unix.xenix:1155 comp.unix.wizards:5484 If users removing all of their files by inadvertently typing "rm *" is a habitual problem at your site, why not make the command default to interactive mode? If you have source this is a trivial task and if you don't have source it's not much harder. Simply move the real rm command to some new secret place, for example: /bin/.hidden/rm, and then make /bin/rm be a shell script which invokes the real rm with the "-i" flag. If you wanted to be real fancy you could add a new option, say "-I", which would disable interactive mode. Another possibility would be to have the shell script enable interactive mode if you try to remove more than some pre-determined number of files. That way you could still type "rm foo" without having to use interactive mode but "rm foo *" would put you into interactive. Of course, nothing you can do will ever solve the problem completely since even the most expert user will occasionally make mistakes. Just the other day I wiped out a weeks worth of work by typing "cc -o pgm.c" on my AT&T unix-pc. I had meant to use -O to invoke the optimizer. Instead, it optimized away all of my code by giving me a message to the effect of "no source file" and happily creating a zero length output file called "pgm.c". I was not at all amused. I now have a shell script in place of cc which checks all its arguments for consistency (i.e. you can't say "-o pgm.c"). -- David H. Brierley Raytheon Submarine Signal Division 1847 West Main Road Portsmouth, RI 02871 Phone: (401)-847-8000 x4073 Internet: dhb@rayssd.ray.com Uucp: {cbosgd, gatech, linus, mirror, necntc, uiucdcs} !rayssd!dhb