[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Why different directory sizes?



On Wed, May 10, 2006 at 12:35:36PM +0200, Felix E. Klee wrote:
> I just discovered two directories with the same number of files and the same 
> number of hard links but different size:
>
> What could be the reason for the different sizes?  They confuse our backup 
> script.

The reason is history.  Like many Unix filesystems, ext3 doesn't
garbage collect empty blocks in a directory.  So if you create a lot
of files in a directory, and then delete them all, the directory
doesn't shrink in size.  In practice this isn't a problem, so we've
never bothered to fix it.  

Why should your backup script care?  It really shouldn't....

						 - Ted


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]