Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!utgpu!water!watmath!clyde!cbosgd!ihnp4!occrsh!occrsh.ATT.COM!rjd
From: rjd@occrsh.ATT.COM.UUCP
Newsgroups: comp.unix.wizards
Subject: Re: multiple names for files
Message-ID: <142700017@occrsh.ATT.COM>
Date: Sun, 6-Dec-87 12:01:00 EST
Article-I.D.: occrsh.142700017
Posted: Sun Dec  6 12:01:00 1987
Date-Received: Sat, 12-Dec-87 09:28:01 EST
References: <9636@mimsy.UUCP>
Lines: 26
Nf-ID: #R:mimsy.UUCP:-963600:occrsh.ATT.COM:142700017:000:1014
Nf-From: occrsh.ATT.COM!rjd    Dec  6 11:01:00 1987


> DenBesten) writes:
> [re convincing rm to remove the file `-b']
> >... I would be tempted to use ./-b myself, since it is independant
> >of where you are.
> 
> When leading new users to Enlightenment :-), I avoid the name `./-b'
> since it introduces the concept `working directory', and it is best
> to confuse only one issue at a time (joke stolen from K&R).

   Maybe this was already mentioned (not all of this note string is here yet),
but one easy way to remove a filname beginning with a '-' is to take advantage
of the "getopt" processing of rm and make the "-" started file the second in a
list of files to remove.  For instance, if the "-b" file is the object of your
frustration, simply remove it by removing another file (doesn't matter if this
other file really exists or not) first on the same command line, e.g.:

$ rm g -b
rm: g non-existent	(You might want to verify that g does not exist first)
$ ls g -b
g: No such file or directory
-b: No such file or directory

     .... No problem.

Randy