On Sat, 4 May 2002, Timothy Bolz wrote:
>I'm having a problem with the directory sizes going from 1024 to sometime 
>2048 and other times some weird numbers like19456 .  I had a problem with 
>gnome and started investigating and found the directory sizes were the same 
>exept in all two directories.  Any suggestions.  

Did you add more files to the directory?  That's the normal reason why
directory sizes increase.

On UNIX, directory space is allocated in multiples of the block size
(usually 1024 on Linux).  When the number of directory entries exceeds what
can be fit into one block, a second block is allocated, and the directory
grows to 2048 bytes.  When that's full, it grows to 3072 bytes, and so on.

How many directory entries can be fit into a block?  That depends.  Linux
tries to be reasonably efficient and pack as many entries into the block as
it can fit...one block will hold a lot of short file names, or only a few
long file names.

               - Neil Parker

P.S.  The above assumes you're using e2fs or some other true UNIX-style
file system.  Other file systems like MS-DOS or Mac HFS use different
directory allocation schemes.

Reply via email to