0

I want clear difference between the block and block size and how the stat function assign the value of the block and block size.

$ stat 15*10.txt
 File: `15*10.txt'
  Size: 1914        Blocks: 8          IO Block: 4096   regular file
Device: 811h/2065d  Inode: 302792      Links: 1
Access: (0644/-rw-r--r--)  Uid: ( 1001/ hussain)   Gid: ( 1001/ hussain)
Access: 2013-10-19 19:13:53.863927172 +0530
Modify: 2013-10-18 15:25:59.109467143 +0530
Change: 2013-10-19 13:05:34.031996517 +0530
 Birth: -

Thanks in Advance

fedorqui
  • 275,237
  • 103
  • 548
  • 598
Q_SaD
  • 355
  • 1
  • 11

1 Answers1

0

See

 man fstat

which reports:

  • The blocks field indicates the number of blocks allocated to the file, 512-byte units.

  • The blocksize field gives the "preferred" blocksize for efficient file system I/O.

Claudio
  • 10,614
  • 4
  • 31
  • 71
  • Hmm! I saw the man page for the fstat, but i cant understand it how it allocates the block size. every file has same block size. How to identify it. – Q_SaD Oct 22 '13 at 14:04