From owner-freebsd-questions Thu Feb 3 12:40:19 2000 Delivered-To: freebsd-questions@freebsd.org Received: from wopr.caltech.edu (wopr.caltech.edu [131.215.240.222]) by builder.freebsd.org (Postfix) with ESMTP id B24FD4014 for ; Thu, 3 Feb 2000 12:40:11 -0800 (PST) Received: (from mph@localhost) by wopr.caltech.edu (8.9.3/8.9.1) id KAA26435; Thu, 3 Feb 2000 10:19:46 -0800 (PST) (envelope-from mph) Date: Thu, 3 Feb 2000 10:19:46 -0800 From: Matthew Hunt To: Michel Adamus Cc: Mauricio Marquez , freebsd-questions@FreeBSD.ORG Subject: Re: deleting a nasty directory entry Message-ID: <20000203101946.A26284@wopr.caltech.edu> References: <3.0.32.20000203105930.017d86e0@enlace.net> <3899B671.8050BFCE@connectalk.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <3899B671.8050BFCE@connectalk.com>; from madamus@connectalk.com on Thu, Feb 03, 2000 at 12:10:09PM -0500 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Thu, Feb 03, 2000 at 12:10:09PM -0500, Michel Adamus wrote: > 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 > op- > tions at that point. This will allow the removal of file names > that be- > gin with a dash (`-'). For example: > rm -- -filename That has nothing to do with the specific problems he mentioned; the shell refuses to even start rm(1) because of the mismatched backquote, and his problems with wildcard expansion would also occur before rm(1) starts. The suggestions that other folks gave to put the filename in quotes or backslash the backquote are more relevant. At least this is a nice change from the usual situation where somebody has a filename that starts with a hyphen, and somebody tells him to put the filename in quotes. -- Matthew Hunt * Science rules. http://www.pobox.com/~mph/ * To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message