Every so often, some application runs wild and fills a directory with a huge amount of files. Once we fix the bug and clean up the files, the directory stays big (>50MB) even though there's only 20-30 files in it.
Is there some command that compacts a directory without having to recreate it?
Bonus points: does a huge empty directory affect access performance of that directory? I'm assuming it does, but maybe it's not worth bothering. It seems slower to do
ls on such a directory.