Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!hao!ames!aurora!labrea!decwrl!pyramid!prls!philabs!micomvax!musocs!mcgill-vision!mouse From: mouse@mcgill-vision.UUCP (der Mouse) Newsgroups: comp.unix.wizards Subject: Re: suggest solutions for "rm *" Message-ID: <911@mcgill-vision.UUCP> Date: Thu, 19-Nov-87 05:07:11 EST Article-I.D.: mcgill-v.911 Posted: Thu Nov 19 05:07:11 1987 Date-Received: Fri, 27-Nov-87 00:05:57 EST References: <5715@j.cc.purdue.edu> Distribution: na Organization: McGill University, Montreal Lines: 29 Keywords: human factors, interfaces, shells In article <5715@j.cc.purdue.edu>, ksb@j.cc.purdue.edu (Kevin Braunsdorf) writes: > Can anyone suggest a solution to the novice user's classic error message: > > % rm * .o > rm: .o nonexistent Sure, use rm -f, that way it won't complain :-) :-) There's the one we use here. The rm program reads the current directory and figures out what * would expand to. If its argument list contains this list of files, and there are more than four or so files involved, it asks the user "are you sure you mean to remove all those files?" before doing so. There is an option to suppress this behavior, for use by shell scripts and people who know they said rm * and they meant it. This avoids the familiarity/fatigue factor of aliasing rm to rm -i (there are tales of people who type "rm *" and answer "yes" for every file on the list because they are so used to doing so). The question is asked only when appropriate. The check for "four or more files" is to avoid questions when removing just the last file in a directory, for example. Not perfect (eg, "rm foo/*>o") but it goes a long way. der Mouse (mouse@mcgill-vision.uViViV