Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!wuarchive!uwm.edu!bionet!agate!usenet From: raymond@math.berkeley.edu (Raymond Chen) Newsgroups: comp.unix.misc Subject: Re: Protection from "rm *" Message-ID: <1990Oct1.032855.29278@agate.berkeley.edu> Date: 1 Oct 90 03:28:55 GMT References: <853@agcsun.UUCP> <8294@milton.u.washington.edu> <1987@sixhub.UUCP> Sender: usenet@agate.berkeley.edu (USENET Administrator) Reply-To: raymond@math.berkeley.edu (Raymond Chen) Distribution: usa Organization: U.C. Berkeley Lines: 14 In-Reply-To: davidsen@sixhub.UUCP (Wm E. Davidsen Jr) I agree with Mr. Davidsen. Don't alias a system command. Write your own "safe rm", call it "can" or "del" or "era", then put the following in your private bin directory under the name "rm": #!/bin/sh echo "Don't use rm. Use del. If you really want rm, use /bin/rm" Too often, I've seen people who have a private little rm alias, who start relying on the -i option, then one day, they do a shell escape !rm * hoping to get the automatic "-i" option, and (oops!) the alias wasn't active (because they put it in their .login, not their .cshrc), or the application uses /bin/sh to handle shell escapes, or... (Heck, it happened to a friend of mine just last week...)