Path: utzoo!attcan!uunet!sdrc!diblanch From: diblanch@sdrc.UUCP (Jeff Blanchet) Newsgroups: comp.sys.hp Subject: Re: Trying to remove a file called "-ls" Summary: Solutions Keywords: HP bug Message-ID: <571@sdrc.UUCP> Date: 13 Mar 89 15:20:57 GMT References: <570@sdrc.UUCP> <2087@helios.ee.lbl.gov> Organization: Structural Dynamics Research Corp., Cincinnati Lines: 32 In article <570@sdrc.UUCP> diblanch@sdrc.UUCP (Jeff Blanchet) writes: >I seem to have stumbled across a bug that occurs on the HP. I created a file >called "-ls". Now on any other UNIX system all I have to do is issue the Thanks to the replys. Of course as usual in most cases a simple solution is the answer to my problem. In my original posting I stated that I could remove a file called "-ls" using "rm -i *". This works on some types of wierd filnames but not "-ls". This occurs on all UNIX systems that I have tried it on. I realize how it happens. Below are a few ways that I have received that will delete the file: $ rm ./-ls Probably the most obvious that I overlooked. $ rm -- -ls Since the dash appears first in a seperate argument the - in the "-ls" part is used as a filename. $ rm foo -ls Adding a file that doesn't exist to be first in the list also deletes the "-ls" file. The remove command will say the foo wasn't found but the "-ls" file does get deleted. Thanks to all who looked into this problem and found the above solutions. Jeff Blanchet UUCP: uunet!sdrc!diblanch SDRC Cincinnati Ohio