I see the following in my prompt...
that is, i have only one file but i see 8 as total.
/home/asla>ls -l
total 8
-rw-r--r-- 1 oracle dba 6 Oct 17 18:59 simple
Can you please tell me why that 8? I checked different sources they say it is number of blocks but in this case it should be 1 because file "simple" occupies only one block!
It is the total number of disc blocks occupied by the directory and the files in the directory and can include indirect blocks as well. Thus the "total" is usually slightly higher than the figure from "du -s". A block is 512 bytes in most modern unix and Linux implementations.
Interestingly when you have a small number of very large files in a directory the value of "total" is nearly the sum of the sizes of the files.
I have seen a directory and files copied within a server and give a different figure for "total".
You can see the following output, here I have just created simple file with 13bytes content. When I do ls -l , it shows me 8 OS Block.. Do you mean that still system creates indirect block ?
I heard that indirect blocks will be created if the content of the file doesn't fit in original block.
My Os block size is 256 bytes.
/home/ammar>ls -l
total 8
-rw-r----- 1 ammar trg 13 Oct 25 08:22 testing
shows the smallest blocksize for your file system(s) in the header. You don't seem to have noted your OS, so there may be other ways... The reason I mention this is 256 byte block filesystems
are not common, IMO.