Date: Thu, 3 Feb 2000 10:19:46 -0800 From: Matthew Hunt <mph@astro.caltech.edu> To: Michel Adamus <madamus@connectalk.com> Cc: Mauricio Marquez <mmarquez@enlace.net>, freebsd-questions@FreeBSD.ORG Subject: Re: deleting a nasty directory entry Message-ID: <20000203101946.A26284@wopr.caltech.edu> In-Reply-To: <3899B671.8050BFCE@connectalk.com>; from madamus@connectalk.com on Thu, Feb 03, 2000 at 12:10:09PM -0500 References: <3.0.32.20000203105930.017d86e0@enlace.net> <3899B671.8050BFCE@connectalk.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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 <mph@astro.caltech.edu> * 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000203101946.A26284>