Xref: utzoo comp.unix.xenix:5962 comp.unix.questions:13571 comp.unix.wizards:16122 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cwjcc!gatech!uflorida!haven!mimsy!chris From: chris@mimsy.UUCP (Chris Torek) Newsgroups: comp.unix.xenix,comp.unix.questions,comp.unix.wizards Subject: Re: Ugly file name Keywords: rm cat mv regexp Message-ID: <17502@mimsy.UUCP> Date: 13 May 89 18:56:54 GMT References: <128@tdl.UUCP> <7170@bsu-cs.bsu.edu> <2214@Portia.Stanford.EDU> Distribution: usa Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742 Lines: 17 In article <2214@Portia.Stanford.EDU> joe@hanauma.stanford.edu (Joe Dellinger) writes: >Even "rm -i *" used to be dangerous. There is the famous case where >somebody accidentally created a file name "-f", and decided to remove >it by doing "rm -i *". The csh dutifully expanded this to >"rm -i -f [files...]", and at that time "-f" overrode "-i" in rm. >Result: everything in the directory deleted EXCEPT the file "-f"! Thus, to be safe against old versions of `rm', use rm -i ./* or, in this case more simply, rm ./-f -- In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163) Domain: chris@mimsy.umd.edu Path: uunet!mimsy!chris