Path: utzoo!attcan!uunet!munnari.oz.au!metro!cluster!necisa!boyd From: boyd@necisa.ho.necisa.oz.au (Boyd Roberts) Newsgroups: comp.unix.internals Subject: Re: I have a file named "-" Message-ID: <2028@necisa.ho.necisa.oz.au> Date: 28 Feb 91 00:33:27 GMT References: <22834@hydra.gatech.EDU> <1991Feb26.170212.22920@convex.com> <6661@idunno.Princeton.EDU> Followup-To: comp.unix.questions Organization: NEC Information Systems Australia Pty. Ltd. Lines: 54 In article <6661@idunno.Princeton.EDU> pfalstad@phoenix.Princeton.EDU (Paul Falstad) writes: > >If you have a file that simply has a '/' in it, you can >just quote the slash: > > rm "/" Sorry? What difference does the quoting make? None. > >1. Write a short C program: > >main() >{ > rename("-",".nfsXXXX"); >} Since when does _every_ system have rename(2)? > >3. Tar up the whole directory and then remove it with rm -rf, then use a >binary editor to change the name of the file to something else. Then >untar it and delete it normally. > The ``let's rearrange the universe to move one rock'' approach. >4. Use ls -i to get the inode of the file, and then ask the super-user >to run clri on the inode, followed by fsck. Preventing all the other users from using the file-system for the duration of this stupidity. >5. Get the source to rm, and remove all the option handling routines >with #ifdefs. Then compile it and use the simpler version of rm to >delete the file. Of course, use the source. We _all_ have the source. > >There may be simpler ways but these should work although I haven't >tested any of them. Hope this helps. ;-) > Maybe even: rm ./- which you can read about in the FAQ! Boyd Roberts boyd@necisa.ho.necisa.oz.au ``When the going gets wierd, the weird turn pro...''