Xref: utzoo comp.unix.xenix:6031 comp.unix.questions:13673 Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!sun-barr!cs.utexas.edu!uunet!tektronix!orca!quark!jeff From: jeff@quark.WV.TEK.COM (Jeff Beadles;X2568;61-215) Newsgroups: comp.unix.xenix,comp.unix.questions Subject: Re: Ugly file name Keywords: rm cat mv regexp Message-ID: <3350@orca.WV.TEK.COM> Date: 17 May 89 02:47:23 GMT References: <128@tdl.UUCP> <7170@bsu-cs.bsu.edu> <1614@auspex.auspex.com> <448@hsi86.hsi.UUCP> Sender: nobody@orca.WV.TEK.COM Reply-To: jeff@quark.WV.TEK.COM (Jeff Beadles) Followup-To: comp.unix.xenix Distribution: usa Organization: Tektronix, Inc., Wilsonville, OR Lines: 20 In article <448@hsi86.hsi.UUCP> derek@hsi86.UUCP (Derek Lee-Wo) writes: >This doesn't work for filenames that start with a minus. eg -badfile >Anyone know how to erase such files with whipping up a short C program? [ I removed comp.unix.wizards, it doesn't apply... ] Most versions of rm will allow this to work: rm - -badfile The single '-' says "No more command options" To use other command options, use something like: rm -f - -badfile -Jeff -- Jeff Beadles Utek Sustaining Engineering, Tektronix Inc. jeff@quark.WV.TEK.COM