Close vote notice: While the linked duplicate asks same question, the comments and the only answer do not provide an answer which draws from authoritative source. The answer on my question by Thomas Dickey, does in fact provide the answer I've been seeking. Thus the proposed duplicate isn't helpful, however Thomas's answer here is proper.
According to the answer by G-Man on Superuser question and personal account in this PerlDuck's comment, directories that have large amount of entries get to a size over 4096 bytes (which can be seen with ls -l
output), but once the entries are removed – the number never goes down.
The question is "why" ? Is it due to how ext4
filesystem configured to retain directory metadata ? Obviously removing the directory and recreating it isn't a solution, since it deletes original inode and creates a new one. What can be done to decrease the number manually ?
Best Answer
Quoting a developer (in a linux kernel thread ext3/ext4 directories don't shrink after deleting lots of files):