4096
Hi, Im posting this question post verifying all similar question related to this.
"Why is the size of a directory always 4096 bytes in unix?" Can u tell me the layman example? Im a beginner. So plz explain me easily understandable. Thanks |
Whenever a directory is created it takes 1 block for storing some system related info (meta-data about files, including the file names contained in that directory).
This doesn't always amount to 4k (4096), it depends on the block-size, which is 4096 on most modern Linux machines. If 1 block isn't enough to store the data, it adds another block (and another and ...). The directory size is always a multiple of the block-size. You can get the block-size that is used with the dumpe2fs command: Code:
dumpe2fs /device | grep "^Block size:" |
All times are GMT -5. The time now is 08:28 AM. |