Re: utterly unremoveable file
On Sun, 4 May 2003 02:19:45 -0400
Rick Pasotto <rick@niof.net> wrote:
> How is it possible to create (actually I want to know how to remove) a
> seemingly unremoveable file. Even when logged in as root and with the
> file system mounted on a different mount point *nothing* seems to get
> rid of it. Not 'rm', not 'mv', not 'cat /dev/null >', not chown, not
> chmod. I can tar the directory and then untar it elsewhere, remove the
> file from that directory, create a new tar file, rename the original
> directory and untar the new tar file but I can't remove the old
> directory since it still contains the offending file.
Possibly the file has been made "immutable" with the chattr command. To
find out, try the lsattr command:
lsattr filename
If it has an "i" (immutable) flag, you can remove it:
chattr -i filename
You might have to be root to do this, especially on a journaled filesystem.
See "man chattr" and "man lsattr".
regards,
Robert
Reply to: