Date: Thu, 18 Oct 2001 10:45:20 -0500 From: Dan Nelson <dnelson@allantgroup.com> To: Sheldon Hearn <sheldonh@starjuice.net> Cc: setantae <setantae@submonkey.net>, freebsd-questions@FreeBSD.ORG Subject: Re: Directory entries won't shrink Message-ID: <20011018104520.A97943@dan.emsphone.com> In-Reply-To: <60807.1003418969@axl.seasidesoftware.co.za> References: <20011018162511.A63087@rhadamanth> <60807.1003418969@axl.seasidesoftware.co.za>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011018104520.A97943>