From owner-freebsd-questions Fri Dec 1 15:42:18 2000 Delivered-To: freebsd-questions@freebsd.org Received: from post.mail.nl.demon.net (post-11.mail.nl.demon.net [194.159.73.21]) by hub.freebsd.org (Postfix) with ESMTP id CD91737B404 for ; Fri, 1 Dec 2000 15:42:13 -0800 (PST) Received: from [212.238.77.116] (helo=buffy.raggedclown) by post.mail.nl.demon.net with smtp (Exim 3.14 #4) id 141zoi-000BkV-00; Fri, 01 Dec 2000 23:42:12 +0000 Received: (from cliff@localhost) by buffy.raggedclown (8.10.2/8.10.2) id eB1Ng9404043; Sat, 2 Dec 2000 00:42:09 +0100 Date: Sat, 2 Dec 2000 00:42:09 +0100 From: Cliff Sarginson To: Mike Meyer Cc: Cliff Sarginson , Larry Rosenman , Daniel.Bye@uk.uu.net, questions@freebsd.org Subject: This is the definitive answer on "pesky" files Et Fin Message-ID: <20001202004209.C3898@buffy.local> References: <119603073@toto.iv> <14888.4617.148599.530943@guru.mired.org> <20001201225640.A2189@buffy.local> <14888.13560.811822.742841@guru.mired.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <14888.13560.811822.742841@guru.mired.org>; from mwm@mired.org on Fri, Dec 01, 2000 at 05:32:08PM -0600 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG One common question is how to remove files whose names begin with a `-'. GNU `rm', like every program that uses the `getopt' function to parse its arguments, lets you use the `--' option to indicate that all following arguments are non-options. To remove a file called `-f' in the current directory, you could type either: rm -- -f or: rm ./-f The Unix `rm' program's use of a single `-' for this purpose predates the development of the getopt standard syntax (Lifted from "info rm") Tra la la Cliff To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message