Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!ames!uhccux!munnari.oz.au!uniwa!DIALix!bernie From: bernie@DIALix.oz.au (Bernd Felsche) Newsgroups: comp.unix.questions Subject: Re: unlink(inode)? or how to remove file with '/' in its name Message-ID: <603@DIALix.oz.au> Date: 17 Nov 90 06:32:37 GMT References: <1990Oct18.030832.10894@melb.bull.oz.au> <1990Oct21.002523.27266@virtech.uucp> <27087@mimsy.umd.edu> <1990Oct21.112102.1478@hq.demos.su> Organization: DIALix Services, Perth Western Australia Lines: 31 In <1990Oct21.112102.1478@hq.demos.su> avg@hq.demos.su (Vadim G. Antonov) writes: >Hm. What are you talkin' about? The fastest and simpliest way to >get rid of this weird file is to open your FM at the page describing >file systems structure and enter: > adb -w /dev/dskNNN ^^^^^^^ Who's still got adb? I used fsdb for much the same thing. >Find the directory entry on the disk, write something valid instead of /, >mount disk and remove it with vanilla rm. Of course it is not a task for >Pascal programmers. ;-) Heck, I could write a setuid program to do it! (Very sleazy indeed, as it would fetch the inode and filesystem info for the directory to fsdb via a pipe: because I'm too lazy to write a subset of fsdb myself.) You _don't_ even have to umount the filesystem, because the only change you are making is to the filename, which can't be de-referenced anyway (almost said "unlinked" :-)), until you rewrite the directory block. On second thought, Pascal programmers should stick to paper... :-) -- ________Bernd_Felsche__________bernie@DIALix.oz.au_____________ [ Phone: +61 9 419 2297 19 Coleman Road ] [ TZ: UTC-8 Calista, Western Australia 6167 ]