Skip to main content
2 of 2
deleted 9 characters in body
user4556274
  • 9.4k
  • 2
  • 35
  • 38

some_file contains h followed by a newline, totaling two bytes. Try something like

hexdump -C some_file 

to view the contents of the file byte by byte.

Any file between 1 and 512 bytes is going to take up one 512-byte block, if that is the minimum allocation size on the disk, just like a 513-byte file will take two 512-byte blocks. The block count is not rounded down to the nearest integer.

user4556274
  • 9.4k
  • 2
  • 35
  • 38