*BSD News Article 24256


Return to BSD News archive

Newsgroups: comp.os.386bsd.questions
Path: sserve!newshost.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!agate!library.ucla.edu!europa.eng.gtefsd.com!uunet!psinntp!newstand.syr.edu!rodan.syr.edu!smcarey
From: smcarey@rodan.syr.edu (Shawn M Carey)
Subject: Re: How do you rm a strange file?
Message-ID: <1993Nov20.195548.20444@newstand.syr.edu>
Organization: Syracuse University, Syracuse, NY
References: <2ch6t2$ih5@netbsd08.dn.itg.telecom.com.au> <CGrCK8.JBC@mcs.anl.gov>
Date: Sat, 20 Nov 93 19:55:48 EST
Lines: 20

In article <CGrCK8.JBC@mcs.anl.gov> winans@xray.aps.anl.gov (John R. Winans) writes:
>In article <2ch6t2$ih5@netbsd08.dn.itg.telecom.com.au> tdwyer@netbsd08.dn.itg.telecom.com.au (Terry Dwyer 619 491 5161) writes:
>>...
>>Any clues how to rm it?
>
>How about "rm -i *"  and say 'n' to everything except the one you want
>to get rid of?  Either that or use wildcards.   If you are root in a nasty
>spot, like /etc or /bin, I HIGHLY recommend the use of the -i flag!
>

	There is a "--" flag that appears to be undocumented in the
man page which tells rm to allow '-' as the first character of a
filename argument.

% rm -- -lg

	I believe I discovered this option in the man page for sunos 4.1.
Fortunately we have the functionality if not the documentation.

-Shawn Carey