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 12:58:10
On Fri, 9 Jan 2004, Rishabh Kumar Goel wrote:
> On Friday 09 Jan 2004 2:42 pm, you wrote:
> > 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?
> > 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.
> Well I m quite new to this world of NetBSD kernel and frankl speaking could
> not understand much of what is written underneath.
[s/underneath/overhead/]
> I did as u told ls -ol.
>
> The output is
>
> total 0
> c--Sr-xrwt 1 538976266 1953394499 uappnd,sappnd 800, 431973 Dec 9 2023 #02024
> c--xrw-r-- 1 1461737806 1095914049 uappnd,nodump 3954, 423536 Oct 26 2030 #02027
> br-sr-s--T 1 1277191017 1852138345 uappnd,uchg,nodump,sappnd,schg 340, 271438 Sep 6 2028 #02028
> br-xr-Sr-x 1 1763904034 1970037614 arch,schg 364, 407120 Aug 30 1994 #02030
> br-Sr----- 1 1163087682 673206367 uappnd,opaque 2080, 471619 Oct 30 2014 #02032
>
> To what setting should these flags be then set to?
So try something like this:
chflags -R nouchg,noschg /lost+found
rm -r lost+found
Frederick