From owner-freebsd-questions Fri Aug 30 21:36:28 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id VAA19264 for questions-outgoing; Fri, 30 Aug 1996 21:36:28 -0700 (PDT) Received: from mail.crl.com (mail.crl.com [165.113.1.22]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id VAA19256 for ; Fri, 30 Aug 1996 21:36:26 -0700 (PDT) Received: from night.primate.wisc.edu by mail.crl.com with SMTP id AA02751 (5.65c/IDA-1.5 for ); Fri, 30 Aug 1996 21:35:02 -0700 Received: by night.primate.wisc.edu; id XAA01509; 8.6.10/41.8; Fri, 30 Aug 1996 23:34:08 -0500 From: Paul DuBois Message-Id: <199608310434.XAA01509@night.primate.wisc.edu> Subject: Re: Unremovable directories To: metcalf@imagine.com (Jeffrey M. Metcalf) Date: Fri, 30 Aug 1996 23:34:07 -0500 (CDT) Cc: questions@freebsd.org In-Reply-To: <3227B030.41C67EA6@imagine.com> from "Jeffrey M. Metcalf" at Aug 30, 96 11:23:28 pm X-Mailer: ELM [version 2.4 PL25] Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk >I was recently doing some system maintenance when I accidentally >corrupted a directory entry. >Apparently some of the symbolic links I was making caused the >corruption. Now when I perform >the following: > >rm -rf unremovable/ > >I get > >rm: unremovable/: Directory not empty > >The directory is owned by root and I am performing the rm command as >root. > >Clearly the directory is empty (rm -rf emptied it). Is there some way >to remove this entry >by referring specifically to its inode? I hope not to have to rebuild >the filesystem. > >The directory entry is not entirely corrupt in the sense that I can copy >files into it >and remove files from it and I can move it around. > >It seems to be linked to another directory in some way. That directory >is also unremovable. This may not solve your problem, but some versions of rm will not remove a directory if you specify a trailing slash on the end of the name. Try "rm -rf unremovable" instead.