MacOS – Size in bytes is significantly less ( half the size) then size in MB in get info window

command linefilefilesystemfoldersmacos

In the get info window it says 387,037,139 bytes which is 387 MB whereas the size on disk is 716.9MB which is 716,900,000 bytes.

du -sh paramgen result (in MiB) 684M paramgen

Why is there such a large difference?

get_info screen

Best Answer

  • 387,037,139 bytes is the sum of the file lengths in bytes. A file however uses whole blocks on disk, hence even a one byte file takes one block. On the partition on which I tested this, a block is 4K. The “on disk” value is the number of blocks times the block size.

    The difference between 684 and 716.9 is a factor of 1.024*1,024, that is the difference between the two possible meanings of megabyte.