yanilsama:~# stat /etc/passwd File: `/etc/passwd' Size: 1300 Blocks: 4 IO Block: 4096 regular file how can i 1300 bytes long file use 4 blocks of 4096 bytes? yanilsama:~# du /etc/passwd 2 /etc/passwd is this number 2, the number of 1024 byte sized device block count? if i want to write a C program like du , and if i use the stat struct it will give me 4 like the stat command, what should i do to get result like du?