Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 Feb 2005 21:20:33 -0600
From:      Dan Nelson <dnelson@allantgroup.com>
To:        "T.F. Cheng" <tfcheng@yahoo.com>
Cc:        Piter <pietro.cerutti@gmail.com>
Subject:   Re: Directory not empty
Message-ID:  <20050225032032.GE60363@dan.emsphone.com>
In-Reply-To: <20050225011427.57070.qmail@web51002.mail.yahoo.com>
References:  <e572718c0502241633313ae0ea@mail.gmail.com> <20050225011427.57070.qmail@web51002.mail.yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
In the last episode (Feb 25), T.F. Cheng said:
> yeah, it's weird. I found that I can rename it (to tmp) then I tried
> to del it:
> > rm -fr tmp
> rm: tmp/qt-x11-free-3.3.4/doc: Directory not empty
> rm: tmp/qt-x11-free-3.3.4/src: Directory not empty

Do you use softupdates, and did your system happen to crash after a
portupgrade?  I bet if you cd into tmp/qt-x11-free-3.3.4/doc and run ls
-la, you'll see something like:

$ ls -la
total 2
drwx------  4 dan  dan  512 Feb 22 11:00 ./
drwxr-xr-x  3 dan  dan  512 Feb 22 11:00 ../

The "." entry should have 2 links in an empty directory (one here, and
one in the parent directory).  That's caused be a failed background
fsck, which is supposed to reset bad link counts after a crash.  If you
check /var/log/messages, you might see something like this:

  PARTIALLY TRUNCATED INODE I=316179
  UNEXPECTED SOFT UPDATE INCONSISTENCY; RUN fsck MANUALLY.

Try rebooting and letting the bgfsck run again, or boot into
single-user mode and run fsck -p on the filesystem.

-- 
	Dan Nelson
	dnelson@allantgroup.com



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050225032032.GE60363>