From owner-freebsd-questions Mon Sep 16 2:12:54 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 98D2B37B400 for ; Mon, 16 Sep 2002 02:12:52 -0700 (PDT) Received: from mail.thundernet.cz (mail.thundernet.cz [62.77.87.114]) by mx1.FreeBSD.org (Postfix) with SMTP id E021843E6E for ; Mon, 16 Sep 2002 02:12:50 -0700 (PDT) (envelope-from neuhauser@bellavista.cz) Received: (qmail 24739 invoked from network); 16 Sep 2002 09:12:38 -0000 Received: from unknown (HELO freepuppy.bellavista.cz) (62.168.44.50) by mail.thundernet.cz with SMTP; 16 Sep 2002 09:12:38 -0000 Received: by freepuppy.bellavista.cz (Postfix, from userid 1001) id 913332FDAB2; Mon, 16 Sep 2002 11:10:02 +0200 (CEST) Date: Mon, 16 Sep 2002 11:10:02 +0200 From: Roman Neuhauser To: Chip Wiegand Cc: Matthew Emmerton , Questions FreeBSD Subject: Re: Help! a directory won't go away even as root -SOLVED Message-ID: <20020916091002.GA370@freepuppy.bellavista.cz> Mail-Followup-To: Chip Wiegand , Matthew Emmerton , Questions FreeBSD References: <1032133467.216.2.camel@chip.wiegand.org> <042301c25d11$a658f470$1200a8c0@gsicomp.on.ca> <1032148419.216.8.camel@chip.wiegand.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1032148419.216.8.camel@chip.wiegand.org> User-Agent: Mutt/1.5.1i Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG # chip@wiegand.org / 2002-09-15 20:53:39 -0700: > On Sun, 2002-09-15 at 16:43, Matthew Emmerton wrote: > > > I have a directory that I can't remove. It's empty and looks like this: > > > dr-xr-xr-x 2 root wheel 512 Aug 14 12:18 empty > > > It's even called empty. Anyway, I can't rm -rf, I can't chmod, when I > > > try I get Operation not permitted, while logged on as root. I have to > > > get rid of this, I can't create a ln -s because this is messing it up. > > > > 'ls -alod empty' will most likely show a flag of 'schg'. Do > > 'chflags noschg empty' and then you should be able to rm -rf without > > problems. > > Thanks to all who replied so quickly. That was exactly the problem. I've > never seen the immutable flag before. Something new to learn about. > > I had just installed fbsd-4.6.2 and then was in the process of moving > /var to /usr/var and linking /usr/var to /var - like this - > > mkdir /usr/var > cd /var > tar cf - . | (cd /usr/var; tar xf - ) > cd / > rm -rf /var > ln -s /usr/var /var > > That's when I couldn't get rid of the directory /var/empty, I have no > idea where it came from, if it was there by default, or what. I've done > this every time I've installed freebsd and this is a first. It's used by OpenSSH, and you want to keep it with the flags and all. -- begin 666 nonexistent.vbs FreeBSD 4.6-STABLE 11:08AM up 12 mins, 2 users, load averages: 0.04, 0.03, 0.01 end To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message