Path: utzoo!utgpu!watmath!clyde!att!pacbell!ames!ncar!unmvax!turing.unm.edu!mike From: mike@turing.unm.edu (Michael I. Bushnell) Newsgroups: comp.unix.wizards Subject: Re: Fun with * Message-ID: <2155@unmvax.unm.edu> Date: 20 Nov 88 05:48:01 GMT References: <1232@atari.UUCP> <564@comdesign.CDI.COM> <17247@agate.BERKELEY.EDU> <8445@alice.UUCP> <17263@agate.BERKELEY.EDU> Sender: news@unmvax.unm.edu Reply-To: mike@turing.unm.edu (Michael I. Bushnell) Organization: University of No Money, Albuquerque, New Mexico Lines: 37 In article <17263@agate.BERKELEY.EDU> weemba@garnet.berkeley.edu (Obnoxious Math Grad Student) writes: >I'm not asking about how to remove the file (thanks, anyway, although >I see the how-many-ways-to-do-so discussion is starting up again): I'm >just saying that "while you're at it [ie, `fixing' rm *]", you as might >as well consider the problem of the user who wants to remove some of his >files, and types "rm -i *", expecting to get interactive prompting, and >instead has all his files removed. If the first file is "-f", you now >have one unhappy user. Actually you don't: Script started on Sat Nov 19 22:42:02 1988 turing.unm.edu 1 ls foo turing.unm.edu 2 touch ./-f turing.unm.edu 3 ls -f foo turing.unm.edu 4 rm -i * rm: remove foo? y turing.unm.edu 5 ls -f turing.unm.edu 6 ^D script done on Sat Nov 19 22:42:23 1988 All that happens is that ./-f isn't removed. As the man page *and* the source (RTFS, you know...) say, -f prevents error messages and the asking of questions for files you can't write. N u m q u a m G l o r i a D e o \ Michael I. Bushnell \ HASA - "A" division /\ mike@turing.unm.edu / \ {ucbvax,gatech}!unmvax!turing.unm.edu!mike