Why do Finder and du report different file size?
- by flipdoubt
I am writing a geektool 3 script to show the size of a particular VMware Fusion virtual machine. Get Info in Finder says the file is "52.91 GB". I run the following du command to get the file size:
> du -hs ~/Documents/Virtual\ Machines.localized/MY-PRECIOUS-7.vmwarevm | awk '{print $1}'
This du -hs command returns the file size as "49G". What accounts for the difference from what Finder reports?
Alternatively, I have tried replacing the -s option with the -d option like so:
du -hd ~/Documents/Virtual\ Machines.localized/MY-PRECIOUS-7.vmwarevm | awk '{print $1}'
This du -hd command returns the file size as "59G". What accounts for the difference between Finder, du -hd, and du -hs?
Also, this du -hd command produces no output in geektool 3. What gives?