Path: utzoo!attcan!uunet!husc6!mailrus!ames!ucsd!sdcsvax!ucsdhub!hp-sdd!nick From: nick@hp-sdd.hp.com (Nick Flor) Newsgroups: comp.sys.hp Subject: Re: Trying to remove a file called "-ls" Keywords: HP bug Message-ID: <1818@hp-sdd.hp.com> Date: 12 Mar 89 05:33:54 GMT References: <570@sdrc.UUCP> Sender: news@hp-sdd.hp.com Reply-To: nick@hp-sdd.hp.com.UUCP (Nick Flor) Organization: Hewlett-Packard, San Diego Division Lines: 22 In article <570@sdrc.UUCP> diblanch@sdrc.UUCP (Jeff Blanchet) writes: > >Anyway I have found one way to get rid of a file with this type of name. >"find . -name "-ls" -exec rm {} \;" got rid of the file. > >Pretty interesting!!! Anyone else know of a way to delete such a file? > Yes. The problem, of course, is that the shell is trying to interpret the file name as command line options. So, just do something to make it realize that it's actually the file name. Try 'rm ../(current directory name)/-ls'. You don't need the single quotes. If it's on your top level directory you can type "rm ~/-ls". Or just type in the full path name. Nick -- + Disclaimer: The above opinions are my own, not necessarily my employer's. + + Oh, sure. Sure. I'm going. But I got | Nick V. Flor * * o * * + + your number, see? And one of these | Hewlett Packard SDD * * /I\ * * + + days, the joke's gonna be on you. | ..hplabs!hp-sdd!nick * * / \ * * +