Originally Posted by maxpolaris
I copied files from an ext4 filesystem on a local usb HD to an ext4 NAS HD.
ls -s reports different sizes.
example diff file output
total 4737532 | total 4885589
110216 Ministry of Sound - Trance Nation 4 - CD 2.mp3 | 110213 Ministry of Sound - Trance Nation 4 - CD 2.mp3
110212 Ferry Corsten - Trance Nation 2001 CD2.mp3 | 110211 Ferry Corsten - Trance Nation 2001 CD2.mp3
103840 Ferry Corsten - Global Transmissions.mp3 103840 Ferry Corsten - Global Transmissions.mp3
Does anyone have any ideas why file sizes reported by ls -s would differ on 2 ext4 file systems?
The s option shows the amount of blocks needed to store a file, not the real size, which is shown by the S option.
Without knowing what the block size is that is being used by either filesystem we/you cannot say if the output is correct.
The following might give you an insight:
do this on the same file on both filesystems
$ stat "Ministry of Sound - Trance Nation 4 - CD 2.mp3"
The fist line shows the actual size, amount of blocks used and the block size.