I created a directory where I put ten files, each one with exactly 1,048,576 characters (1024^2). The size of each one of them should be exactly one megabyte, counting megabyte as 1024^2 bytes.
If I use ls -lh on that directory, this is the output
[ me: /home/me/test ] ls -lh the_directory
total 11M
-rw-r--r-- 1 me we 1.0M Feb 1 17:11 f0
-rw-r--r-- 1 me we 1.0M Feb 1 17:11 f1
-rw-r--r-- 1 me we 1.0M Feb 1 17:11 f2
-rw-r--r-- 1 me we 1.0M Feb 1 17:11 f3
-rw-r--r-- 1 me we 1.0M Feb 1 17:11 f4
-rw-r--r-- 1 me we 1.0M Feb 1 17:11 f5
-rw-r--r-- 1 me we 1.0M Feb 1 17:11 f6
-rw-r--r-- 1 me we 1.0M Feb 1 17:11 f7
-rw-r--r-- 1 me we 1.0M Feb 1 17:11 f8
-rw-r--r-- 1 me we 1.0M Feb 1 17:11 f9
Why does it add up to 11M if the sum of the colum is exactly 10.0M? If I do ls -lha, then I see that the directories .
and ..
account for 4KB each. There is NOTHING else in this directory.
Why is this so?
This was done in a Linux box.