Date: Wed, 22 Apr 1998 10:52:04 -0400 From: Randall Hopper <rhh@ct.picker.com> To: Andrew <andrew@iaccess.com.au>, Randy Katz <randyk@ccsales.com>, freebsd-questions@FreeBSD.ORG Subject: Re: How To Delete Certain Files Message-ID: <19980422105204.A24838@ct.picker.com> In-Reply-To: <008a01bd53ac$8dd26c60$e34a05cb@alpine.iaccess>; from Andrew on Fri, Mar 20, 1998 at 02:02:01PM %2B1100 References: <008a01bd53ac$8dd26c60$e34a05cb@alpine.iaccess>
next in thread | previous in thread | raw e-mail | index | archive | help
Andrew: |Randy Katz <randyk@ccsales.com>: |>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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19980422105204.A24838>