Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!apple!snorkelwacker!bloom-beacon!athena.mit.edu!jik From: jik@athena.mit.edu (Jonathan I. Kamens) Newsgroups: comp.unix.misc Subject: Re: Protection from "rm *" Message-ID: <1990Oct1.191726.185@athena.mit.edu> Date: 1 Oct 90 19:17:26 GMT References: <853@agcsun.UUCP> <1986@sixhub.UUCP> <1034@bilver.UUCP> Sender: daemon@athena.mit.edu (Mr Background) Reply-To: jik@athena.mit.edu (Jonathan I. Kamens) Distribution: usa Organization: Massachusetts Institute of Technology Lines: 35 In article <1034@bilver.UUCP>, bill@bilver.UUCP (Bill Vermillion) writes: |> Now however, I can't seem to figure how to get rid of the -i. I have tried |> all variations of quotes, backslashes, wildcards. Read the monthly Frequently Asked Questions posting in comp.unix.questions. The last version was posted on September 6. The FIRST QUESTION answered by that posting is, "How do I remove a file whose name begins with a `-' ?" Here's the answer it provides: 1) How do I remove a file whose name begins with a "-" ? Figure out some way to name the file so that it doesn't begin with a dash. The simplest answer is to use rm ./-filename (assuming "-filename" is in the current directory, of course.) This method of avoiding the interpretation of the "-" works with other commands too. Many commands, particularly those that have been written to use the "getopt(3)" argument parsing routine, accept a "--" argument which means "this is the last option, anything after this is not an option", so your version of rm might handle "rm -- -filename". Some versions of rm that don't use getopt() treat a single "-" in the same way, so you can also try "rm - -filename". Also, the man page for "rm" usually mentions the "--" or "-" option. -- Jonathan Kamens USnail: MIT Project Athena 11 Ashford Terrace jik@Athena.MIT.EDU Allston, MA 02134 Office: 617-253-8495 Home: 617-782-0710