Re: Unerasable file

Andreas Schwab (schwab@issan.informatik.uni-dortmund.de)
07 Nov 1997 10:57:22 +0100


Andi Gutmans <andi@vipe.technion.ac.il> writes:

|> I have an unerasable file. fsck doesn't help,a nd I even tried to make a
|> little cproggy that will call unlink() (who knows what checks rm does
|> before). I still can't erase it.
|> Here's some info:
|> 22:11 vipe /bin.old# ls -ldg .
|> 1 drwxr-xr-x 2 bin bin 1024 Nov 1 19:28 ./
|> 22:11 vipe /bin.old# ls -lg csh
|> 2048 cr-x-wSr-x 1 24 20480 0, 1 Jan 1 1970 csh

This file was probably the result of a crash. Since chattr only works on
plain files (IMHO this should be fixed some day) you won't be able to
remove the immutable flag from this inode. You'll have to use debugfs(8)
to manually clear out the inode, then fsck can fix the rest.

-- 
Andreas Schwab                                      "And now for something
schwab@issan.informatik.uni-dortmund.de              completely different"
schwab@gnu.org