Here's what happened when I created a new directory and immediately ran du on it. There are no contents in this directory.
me@mybox[~]$ mkdir /scratch/test2 me@mybox[~]$ du -sh /scratch/test2 4.0K /scratch/test2
OK, so, a new directory in /scratch (which is a LV on sda which is running RHEL 6.6) takes up 4.0K of space.
me@mybox[~]$ mkdir /home/me/test me@mybox[~]$ du -sh /home/me/test 512 test
A new directory in my home directory (which is an ZFS directory hosted via NFS from a Solaris server) takes 512 bytes. Now if I wait a minute or so and du /home/me/test again:
me@mybox[~]$ du -sh /home/me/test 1.5K test
The amount of space taken jumps to 1.5K, despite the directory still being empty (as far as I can tell from
I would like to understand the technical reasons for these differences. Just in general, like what is happening in the short span between the directory taking 512 bytes and 1.5K? What does that extra space signify? Why are both 512 bytes and 1.5K significantly smaller than the 4.0K required for a directory on the local disk?