From owner-freebsd-questions Thu Oct 18 8:45:30 2001 Delivered-To: freebsd-questions@freebsd.org Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by hub.freebsd.org (Postfix) with ESMTP id 8290B37B403 for ; Thu, 18 Oct 2001 08:45:27 -0700 (PDT) Received: (from dan@localhost) by dan.emsphone.com (8.11.6/8.11.6) id f9IFjKZ80175; Thu, 18 Oct 2001 10:45:20 -0500 (CDT) (envelope-from dan) Date: Thu, 18 Oct 2001 10:45:20 -0500 From: Dan Nelson To: Sheldon Hearn Cc: setantae , freebsd-questions@FreeBSD.ORG Subject: Re: Directory entries won't shrink Message-ID: <20011018104520.A97943@dan.emsphone.com> References: <20011018162511.A63087@rhadamanth> <60807.1003418969@axl.seasidesoftware.co.za> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <60807.1003418969@axl.seasidesoftware.co.za> User-Agent: Mutt/1.3.23i X-OS: FreeBSD 5.0-CURRENT X-message-flag: Outlook Error 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 In the last episode (Oct 18), Sheldon Hearn said: > > > On Thu, 18 Oct 2001 16:25:11 +0100, setantae wrote: > > > I've previously been led to be believe that the only way to do this > > is to recreate the directory, and that directories never shrink on > > their own. > > That's pretty bad news, but thanks for the reply. :-) They will shrink, but it will only shrink when a file is added to the directory, and it will only truncate the directory (so if one of your 64 files is in the last block of the directory, it'll never shrink). You can sort of work around this by renaming each file, which will move it to the first open slot in the directory. for i in * ; do mv $i $$.tmp ; mv $$.tmp $i ; done -- Dan Nelson dnelson@allantgroup.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message