Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!bbn!oberon!aero!venera.isi.edu!raveling From: raveling@vaxb.isi.edu (Paul Raveling) Newsgroups: comp.sys.hp Subject: Re: Trying to remove a file called "-ls" Keywords: HP bug Message-ID: <7775@venera.isi.edu> Date: 14 Mar 89 16:51:49 GMT References: <570@sdrc.UUCP> <2087@helios.ee.lbl.gov> <7770@venera.isi.edu> <7572@pyr.gatech.EDU> Sender: news@venera.isi.edu Reply-To: raveling@vaxb.isi.edu.UUCP (Paul Raveling) Organization: USC-Information Sciences Institute Lines: 29 In article <7572@pyr.gatech.EDU> curci@stat.fsu.edu (Ray Curci (scri)) writes: >In article <7770@venera.isi.edu> raveling@isi.edu (Paul Raveling) writes: >>In article <2087@helios.ee.lbl.gov> JEMilburn@lbl.gov writes: >>>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 >>>Try rm "-ls". >>Paul Raveling >>Raveling@isi.edu > >The usuall way to get rid of files that begin with '-' is to use the '-' >flag in the 'rm' command. To remove the file "-ls", you nomally enter >the command: rm - -ls >The first dash acts as a place holder so that the rm program does not >misinterpret the "ls" as flags to the rm program. This removes -ls, but it's because rm interperts the 1st - as a filename. It produces a message of "rm: - non-existent" and $status = 2, but does remove -ls. A footnote on reference to my signature should be that none of the referenced comments were mine. My 2 bits is that the most sanitary approach under Unix is "rm ./-ls". The best approach for both sanitation esthetics and user-humane command line interfaces is to use a better operating system. ---------------- Paul Raveling Raveling@isi.edu