Subject: Re: How can i remove the contents of lost+found directory
To: Frederick Bruckman <fredb@immanent.net>
From: Steven M. Bellovin <smb@research.att.com>
List: netbsd-users
Date: 01/09/2004 18:24:38
In message <Pine.NEB.4.58.0401090830200.3287@rapture.immanent.net>, Frederick B
ruckman writes:
>On Fri, 9 Jan 2004, Rishabh Kumar Goel wrote:
>
>> Sometime back i ran fsck on my system and during which it created the lost a
>nd
>> 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 #0202
>4
>> c--xrw-r--  1 1461737806  1095914049         3954, 423536 Oct 26  2030 #0202
>7
>> br-sr-s--T  1 1277191017  1852138345          340, 271438 Sep  6  2028 #0202
>8
>> br-xr-Sr-x  1 1763904034  1970037614          364, 407120 Aug 30  1994 #0203
>0
>> br-Sr-----  1 1163087682  673206367          2080, 471619 Oct 30  2014 #0203
>2
>
>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. 

It's worse than that -- note that these files are all devices files, 
character mode and block mode.  Those aren't sizes listed; they're 
major and minor device numbers.  A consequence of that is that they 
occupy no disk space; deleting them won't help.  (There's another hint: 
notice that "total 0" line at the beginning.)

		--Steve Bellovin, http://www.research.att.com/~smb