Path: utzoo!attcan!uunet!husc6!mailrus!ames!pasteur!agate!garnet!weemba From: weemba@garnet.berkeley.edu (Obnoxious Math Grad Student) Newsgroups: comp.unix.wizards Subject: Re: Fun with * Message-ID: <17263@agate.BERKELEY.EDU> Date: 20 Nov 88 03:21:16 GMT References: <1232@atari.UUCP> <564@comdesign.CDI.COM> <17247@agate.BERKELEY.EDU> <8445@alice.UUCP> Sender: usenet@agate.BERKELEY.EDU Reply-To: weemba@garnet.berkeley.edu (Obnoxious Math Grad Student) Organization: Brahms Gang Posting Central Lines: 21 In-reply-to: ark@alice.UUCP (Andrew Koenig) In article <8445@alice.UUCP>, ark@alice (Andrew Koenig) writes: >In article <17247@agate.BERKELEY.EDU>, weemba@garnet.berkeley.edu (Obnoxious Math Grad Student) writes: >> And while you're at it, don't forget the problem of the lexicograph- >> ically first file being named "-f". >If your rm command uses getopt, you can remove a file named "-f" by saying > rm -- -f 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. "rm -i -- *" will avoid this problem, but I don't expect a lot of people to get into the habit of typing "--" here and in similar situations. ucbvax!garnet!weemba Matthew P Wiener/Brahms Gang/Berkeley CA 94720