help removing a file

Karl Denninger karl at ddsw1.MCS.COM
Sun Sep 9 13:38:10 AEST 1990


In article <1990Sep6.183808.20578 at Matrix.COM> abc at matrx.UUCP (Alan Clegg) writes:
>In article <1990Sep6.163646.17499 at dg-rtp.dg.com> eliot at dg-rtp.dg.com writes:
>>In article <1990Sep5.180847.21767 at zaphod.mps.ohio-state.edu>,
>>harmon at function.mps.ohio-state.edu (Jim Harmon) writes:
>>|> Could someone someone help me with removing a file. ...
>>|> I even tried doing `rm -i *` and it matches
>>|> zhangNevai.tex but says there's No such file or directory.
>>
>>If 'rm -i *' fails, it is a bad one indeed.

"rm -i" will fail quite often.  There are a number of pathological cases
(see one below :-) that will blow rm's puny mind.

>Well, I managed to get a file with a '/' (slash) in it's name to appear under
>DG/UX.  No problem, right?  Can't remove the sucker, can't mv the sucker, 
>can't even remove '-rf' the directory it lives in...  

One solution to this problem that I've used is to do a "ls -li" on the
directory, get the INODE NUMBER, unmount the filesystem (VERY important!)
and then, as root, use "clri" to clear the inode.  Then run fsck and
remount.

If it's the root filesystem, clri the inode, sync several times, pray 
to whichever deity you wish to honor, and hit reset.

This ALWAYS works, regardless of the crap you've managed to get into the
filename.  It's a desparate move, but if rm -i won't work, you may have to
do this.

--
Karl Denninger (karl at ddsw1.MCS.COM, <well-connected>!ddsw1!karl)
Public Access Data Line: [+1 708 808-7300], Voice: [+1 708 808-7200]
Macro Computer Solutions, Inc.   "Quality Solutions at a Fair Price"



More information about the Comp.unix.admin mailing list