Path: utzoo!utgpu!water!watmath!clyde!att-cb!osu-cis!tut.cis.ohio-state.edu!mailrus!nrl-cmf!ames!ucsd!sdcsvax!ucsdhub!hp-sdd!hplabs!hpda!hpcupt1!hpcuhb!hpcllla!hpclisp!hpclscu!shankar From: shankar@hpclscu.HP.COM (Shankar Unni) Newsgroups: comp.unix.wizards Subject: Re: an rm question Message-ID: <670012@hpclscu.HP.COM> Date: 16 Apr 88 02:26:31 GMT References: <27133@yale-celray.yale.UUCP> Organization: HP NSG/ISD Computer Language Lab Lines: 19 > I managed to create a file whose name contained bizarre characters; in > fact, they were so bizarre that rm * wouldn't remove them (oh well, > porting arc is a nasty business), I got a nonexistent file message. This isn't "rm"'s fault: Let's say that you managed to create a file called "a.*\03\07^q". If you just typed in rm a.*\03\07^q, the *shell* steps in and does nasty stuff. Even quoting doesn't often help (what if the last character of the file name is '\' ?). On the other hand, "rm -ir" on the directory containing it helps, because the shell is no longer involved: "rm" reads the names directly from the directory. We had the same problem frequently when people would create files called, for instance "-b", and rm would choke (-b: illegal option!). The solution was (a) rm -- -b (the -- terminates the option list, IN MANY IMPLEMENTATIONS), or (b) rm nonexistentfile -b or (c) /etc/unlink -b (for superusers only). --scu