Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 Nov 1998 08:14:48 +0000
From:      Mark Ovens <marko@uk.radan.com>
To:        "Leonard C." <leonardc9@usa.net>
Cc:        questions@FreeBSD.ORG
Subject:   Re: How to delete files starting with "-"?
Message-ID:  <365A6AF8.5B660D59@uk.radan.com>
References:  <v04011709b2801982e8b9@[10.0.0.2]>

next in thread | previous in thread | raw e-mail | index | archive | help
Leonard C. wrote:
> 
> I accidentally created a file starting with a dash, and can't seem to
> delete it.  mv, cp, and rm all interpret the dash as an argument.
> 
> If "-foo" is the name of the file, I've tried "-foo", '-foo', and \-foo,
> but none of them work since these just affect the shell rather than the
> actual parsing of the command itself.  Any ideas?  This is driving me
> *absolutely* crazy!
> 

rm - -foo

Note the space between the 2 "-"'s


> Thanks,
> 
> Leonard
> 
> --
> Support the Blue Ribbon Campaign for free speech online        ()
> http://www.eff.org/blueribbon.html                             /\
> "Those who will not reason perish in the act.
> Those who will not act, perish for that reason." - W. H. Auden
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-questions" in the body of the message

-- 
  Trust the computer industry to shorten Year 2000 to Y2K. It
  was this thinking that caused the problem in the first place.

Mark Ovens, CNC Applications Engineer, Radan Computational Ltd.
Bath, Avon, England.  Sheet Metal CAD/CAM Solutions
mailto:marko@uk.radan.com    http://www.radan.com

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?365A6AF8.5B660D59>