Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 20 Aug 1999 11:38:34 +0100
From:      Ben Smithurst <ben@scientia.demon.co.uk>
To:        "Korchagin, Dmitry" <sting@hippo.ru>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: Deadless file
Message-ID:  <19990820113834.B16062@lithium.scientia.demon.co.uk>
In-Reply-To: <000f01beeade$f28515c0$0201a8c0@sting.grata.hippo.ru>
References:  <000f01beeade$f28515c0$0201a8c0@sting.grata.hippo.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
Korchagin, Dmitry wrote:

> I have created file with name "-z" in mistake and can't remove it.
> 
> $ ls
> -z
> $ rm -z
> rm: illegal option -- z
> 
> How can I remove such files?

This is answered in the Unix FAQ, posted regularly to comp.answers. I
suggest you read it, it contains useful information. Anyway, just do `rm
./-z' or `rm -- -z' so that rm doesn't treat `-z' as a flag.  This works
for many other things. The first form is probably more portable since it
doesn't rely on the program knowing about the `--' separator.

-- 
Ben Smithurst            | PGP: 0x99392F7D
ben@scientia.demon.co.uk |   key available from keyservers and
                         |   ben+pgp@scientia.demon.co.uk


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?19990820113834.B16062>