Subject: Re: How can i remove the contents of lost+found directory
To: Rishabh Kumar Goel <rishabh@soc-soft.com>
From: Frederick Bruckman <fredb@immanent.net>
List: netbsd-users
Date: 01/09/2004 08:42:09
On Fri, 9 Jan 2004, Rishabh Kumar Goel wrote:
> Sometime back i ran fsck on my system and during which it created the lost and
> found directory. The contents of the directory is attached hereunder. Now my
> root filesystem is full and to free some space i have to remove its contents.
> I tried "rm -f *" but it says Operation not permitted. How can i remove them?
>
>
> total 0
> c--Sr-xrwt 1 538976266 1953394499 800, 431973 Dec 9 2023 #02024
> c--xrw-r-- 1 1461737806 1095914049 3954, 423536 Oct 26 2030 #02027
> br-sr-s--T 1 1277191017 1852138345 340, 271438 Sep 6 2028 #02028
> br-xr-Sr-x 1 1763904034 1970037614 364, 407120 Aug 30 1994 #02030
> br-Sr----- 1 1163087682 673206367 2080, 471619 Oct 30 2014 #02032
The simple answer is, use "ls -ol" to see the flags that are set on
the file, and "chflags" to change them. The "immutable" or "system
immutable" flags are probably set. Note that if you are at
secure-level 2, you may have to reboot to single-user before you can
change some of those flags.
Now to get the "big picture", observe that you have random bits set on
those files, not only the flags, but random mode bits, too. This means
your directories are getting corrupted. The most likely culprit is a
failing or overheating hard disk, but bad cache in the controller card
or motherboard, or bad system memory could do this, too. The other way
to get this is to mount the file systems "async", but barring that, it
indicates a hardware failure of some kind.
Frederick