From owner-freebsd-questions Wed Apr 22 07:53:36 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id HAA25737 for freebsd-questions-outgoing; Wed, 22 Apr 1998 07:53:36 -0700 (PDT) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from whqvax.picker.com (whqvax.picker.com [144.54.1.1]) by hub.freebsd.org (8.8.8/8.8.8) with SMTP id OAA25730 for ; Wed, 22 Apr 1998 14:53:33 GMT (envelope-from rhh@ct.picker.com) Received: from ct.picker.com by whqvax.picker.com with SMTP; Wed, 22 Apr 1998 10:53:02 -0400 (EDT) Received: from elmer.ct.picker.com by ct.picker.com (4.1/SMI-4.1) id AA05878; Wed, 22 Apr 98 10:53:00 EDT Received: by elmer.ct.picker.com (SMI-8.6/SMI-SVR4) id KAA24892; Wed, 22 Apr 1998 10:52:05 -0400 Message-Id: <19980422105204.A24838@ct.picker.com> Date: Wed, 22 Apr 1998 10:52:04 -0400 From: Randall Hopper To: Andrew , Randy Katz , freebsd-questions@FreeBSD.ORG Subject: Re: How To Delete Certain Files Mail-Followup-To: Andrew , Randy Katz , freebsd-questions@FreeBSD.ORG References: <008a01bd53ac$8dd26c60$e34a05cb@alpine.iaccess> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.91.1i In-Reply-To: <008a01bd53ac$8dd26c60$e34a05cb@alpine.iaccess>; from Andrew on Fri, Mar 20, 1998 at 02:02:01PM +1100 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Andrew: |Randy Katz : |>Hello, |> |>I have files that are named: |> |>-p |>--exclude |> |>How would I go about removing them? | |try this | |rm -rf "--exclude" |rm -rf "-p" I don't think this will work. What you want is: rm -- --exclude -p "--" terminates argument processing so that "rm" doesn't think anything else after that beginning with a "-" is an option. This should work with most system commands. Alternatively, change the filename so that it doesn't start with a -. E.g.: rm ./--exclude ./-p Another option. Put a filename that "doesn't" begin with a dash (possibly) before the ones that do. E.g.: rm abcdef --exclude -p Randall To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message