Path: utzoo!utgpu!water!watmath!clyde!att-cb!att-ih!ihnp4!ihlpf!nevin1 From: nevin1@ihlpf.ATT.COM (00704a-Liber) Newsgroups: comp.unix.wizards Subject: Re: an rm question Message-ID: <4436@ihlpf.ATT.COM> Date: 15 Apr 88 21:37:24 GMT References: <27133@yale-celray.yale.UUCP> Reply-To: nevin1@ihlpf.UUCP (00704a-Liber,N.J.) Organization: AT&T Bell Laboratories - Naperville, Illinois Lines: 25 In article <27133@yale-celray.yale.UUCP> moran-william@CS.Yale.EDU (William L. Moran Jr.) writes: >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. >Anyway, since the directory they were in was junk I went up one dir >and did an 'rm -r' on the directory, and that worked. So, being the >curious sort, I went to the BSD sources and took a look; however, I >can't figure out why the rm -r worked when the other didn't. Here is the SVR3 explanation (although it should be the same): When you use '*', the shell expands it into filenames and then splits them up via delimiters (such as space) to send to an exec() system call. On filenames with bizarre chars in them the split is done incorrectly. When you use 'rm -r', I think (I haven't looked at the sources lately) that the file names are taken directly out of the directory file so the shell expansion problems do not occur. Hope this helps, -- _ __ NEVIN J. LIBER ..!ihnp4!ihlpf!nevin1 (312) 510-6194 ' ) ) "The secret compartment of my ring I fill / / _ , __o ____ with an Underdog super-energy pill." / (_