Don't worry, this isn't typical "du vs. df" question. :-)
I mounted a squashfs image (via loop) and used du to reported the size: du --apparent-size -lsh image1/ which reported 215M. Then I used rsync ("rsync -aS") to copy all files to a real partition (ext4). To my surprise du reports for this directory now: 302M. Where do the additional 87MB come from? Without --apparent-size the values are 242M and 676M, respectively.
Tell me more
×
Unix & Linux Stack Exchange is a question and answer site for
users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.
|
|
|||
|
Gilles had the right idea. Comparing the two outputs showed that squashfs reported different sizes for the directories than ext4 which (probably) explains the difference. Thanks to all who responded. |
|||
|
du -ab | sort -k2on both sides and see what files' sizes differ. – Gilles Mar 1 '12 at 1:35