Return to BSD News archive
Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!news.cs.su.oz.au!metro!metro!news.nsw.CSIRO.AU!mel.dit.csiro.au!munnari.OZ.AU!spool.mu.edu!howland.erols.net!www.nntp.primenet.com!nntp.primenet.com!news.primenet.com!bkogawa From: bkogawa@primenet.com (Bryan Ogawa) Newsgroups: comp.unix.bsd.freebsd.misc Subject: Re: dummy question Date: 12 Oct 1996 02:04:02 -0700 Organization: Primenet Services for the Internet Lines: 30 Message-ID: <53nmu2$rt4@nnrp1.news.primenet.com> References: <53mfdu$1iv@wa4phy.async.com> <53nf8l$kaa@Symiserver2.symantec.com> X-Posted-By: bkogawa@206.165.5.108 (bkogawa) tedm@agora.rdrop.com writes: >In <53mfdu$1iv@wa4phy.async.com>, sam@wa4phy.async.com (S.W. Drinkard) writes: >> >>Ok, I'm not exactly a newbie, but I created a file with a filename of >>"--remove-files" due to a blunder of the fingers. SysV would let me >>remove it in quotes, or by matching a wildcard patern. I tried every >>combination of rm/mv/whatever short of the 45-cal pistol. How does >>*bsd do it? This question is answered in the comp.unix.questions faq, I think, which is a good read for a number of other answers, as well. rm ./--remove-files This is the easiest way I know of to remove names starting with - . >I used to have a small C source code program I kept around for this, >it consisted of the system call to remove a particular file. Whenever I >accidentally created one of these I'd edit the program and recompile it >then run it. >Another way is if the file is in a subdirectory is to move everything else out of the >subdirectory, then change to the parent and do a "rm -r" this usually gets >everything. >A perl person could probably give you a working script for something like this. -- bryan k. ogawa <bkogawa@primenet.com> <bkogawa@netvoyage.net>