From owner-freebsd-questions Mon Mar 4 00:02:20 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id AAA10516 for questions-outgoing; Mon, 4 Mar 1996 00:02:20 -0800 (PST) Received: from gilberto.physik.rwth-aachen.de (gilberto.physik.rwth-aachen.de [137.226.31.2]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id AAA10477 for ; Mon, 4 Mar 1996 00:01:40 -0800 (PST) Received: (from kuku@localhost) by gilberto.physik.rwth-aachen.de (8.6.11/8.6.9) id JAA17969; Mon, 4 Mar 1996 09:05:27 +0100 From: "Christoph P. Kukulies" Message-Id: <199603040805.JAA17969@gilberto.physik.rwth-aachen.de> Subject: Re: How to delete strange filename To: dkelly@hiwaay.net (David Kelly) Date: Mon, 4 Mar 1996 09:05:27 +0100 (MET) Cc: james@teamos2.org, freebsd-questions@freebsd.org In-Reply-To: from "David Kelly" at Mar 3, 96 11:15:42 pm Reply-To: Christoph Kukulies X-Mailer: ELM [version 2.4 PL25 ME8b] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-questions@freebsd.org Precedence: bulk > > >Okay, stupid question here: > > > >Somehow, I've got a file called "-i" in my home directory. How do I > >remove it? Everything I've tried attempts to parse the "-i" as a > >parameter, even with quotes (all varieties). > > > >Is there something I can use to change the switch character, like some of > >the DOS C library calls can ? > > rm ./-i rm has an escape for these strange filename cases. Use: rm -- -i > > The leading "./" will cause the switch character detect to fail, yet it > says, "This directory, the file -i" which is what you want. > > -- > David Kelly N4HHE, n4hhe@amsat.org, dkelly@hiwaay.net > ============================================================= > To invent, you need a good imagination and a pile of junk. > - Thomas Edison > > > --Chris Christoph P. U. Kukulies kuku@gil.physik.rwth-aachen.de