Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 Jul 1999 20:05:00 -0400 (EDT)
From:      Chris <chrismar@shasta.eclipse.net>
To:        Joseph Scott <joseph@randomnetworks.com>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: whoops, can't remove file :\
Message-ID:  <Pine.BSF.4.10.9907192004370.23047-100000@shasta.eclipse.net>
In-Reply-To: <Pine.BSF.4.05.9907191945040.3795-100000@unix1.digital-web.net>

next in thread | previous in thread | raw e-mail | index | archive | help
-----BEGIN PGP SIGNED MESSAGE-----

That worked, thanks alot!

Chris

On Mon, 19 Jul 1999, Joseph Scott wrote:

> 
> 	Take a look at the man page for rm(1).  You'll find this treasure
> right under the NOTE section :
> 
> NOTE
>      The rm command uses getopt(3) to parse its arguments, which allows it
> to accept the `--' option which will cause it to stop processing flag
> options at that point.  This will allow the removal of file names that
> begin with a dash (`-'). For example:
>          rm -- -filename
>      The same behavior can be obtained by using an absolute or relative
> path reference.  For example:
>          rm /home/user/-filename
>          rm ./-filename
> 
> Took me awhile to figure this out the first time I did it :-)
> 
> Joseph Scott
> joseph@randomnetworks.com
> 
> 
> On Mon, 19 Jul 1999, Chris wrote:
> 
> > -----BEGIN PGP SIGNED MESSAGE-----
> > 
> > Dumb 'ol me accidently created a file with a leading - and now I can't get
> > rid of it because rm tells me "invalid option".
> > 
> > ex- 
> > 
> > chrismar@stupid /home > rm -rf -h
> > rm: invalid option -- h
> > Try `rm --help' for more information.
> > 
> > Any ideas?
> > 
> > Chris
> > 
> > -----BEGIN PGP SIGNATURE-----
> > Version: 2.6.2
> > 
> > iQB1AwUBN5O3y/bh8rV07zbRAQEBbgMAk8PPX3C8qPE8jNBTapX4EAnGHynDcH9J
> > sYxgaphxQULEHPzR7zi/DJKdkkh6MAb25jGPSPqEpKKgCOYYsyXfLRxzW4G16ukQ
> > NUdPdKNDPsRCw32Gmh5oBaRilIG51BZG
> > =UfYk
> > -----END PGP SIGNATURE-----
> > 
> > 
> > 
> > To Unsubscribe: send mail to majordomo@FreeBSD.org
> > with "unsubscribe freebsd-questions" in the body of the message
> > 
> 
> 
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-questions" in the body of the message
> 

-----BEGIN PGP SIGNATURE-----
Version: 2.6.2

iQB1AwUBN5O9Lvbh8rV07zbRAQFNHQMA7HOGrQ+gLMSOAx1lrrsk1pXzaWQcr3eg
6gWTdLrI5vSRU29VxST4OtGJ7J4f04GBd53gjq6yJidU/87pGaxqWGuxVg4y82yg
IqNDxQwTlxNfN4bGtsN1Fii1hG4ZYETS
=YlI0
-----END PGP SIGNATURE-----



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.10.9907192004370.23047-100000>