*BSD News Article 80468


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!news.ecn.uoknor.edu!solace!news.stealth.net!news.ibm.net.il!arclight.uoregon.edu!news.uoregon.edu!Symiserver2.symantec.com!news
From: tedm@agora.rdrop.com
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: dummy question
Date: 12 Oct 1996 06:53:09 GMT
Organization: Symantec Corp.
Lines: 19
Message-ID: <53nf8l$kaa@Symiserver2.symantec.com>
References: <53mfdu$1iv@wa4phy.async.com>
Reply-To: tedm@agora.rdrop.com
NNTP-Posting-Host: shiva2.central.com
X-Newsreader: IBM NewsReader/2 v1.2.5

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?

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.