Why do Finder and du report different file size?
Posted
by flipdoubt
on Super User
See other posts from Super User
or by flipdoubt
Published on 2010-03-28T15:01:20Z
Indexed on
2010/03/28
15:03 UTC
Read the original article
Hit count: 517
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?
© Super User or respective owner