I have been moving a large number of files between a Linux system (ext3
) and Mac OS X (HFS
) and have noticed the slight variation in how the file size is reported by the ls
command.
Having done some digging round the man pages I'm guessing this difference has to do with how the actual data is stored on the disk, and/or how the ls
command on each system is looking at the size (i.e. disk usage, blocks used, etc.).
However, I'm still confused and wondering if there is a simpler answer to the different file sizes between the two systems. Is this a difference in the ls
command, or in the filesystems? etc.
ls
are you checking? The “total” line fromls -l
might be different if the filesystems use different block/fragment sizes. If the size in bytes (usually between user/group and date) of a file is different, then you likely have a bad copy. Runmd5
/sha1
/openssl md5
/openssl sha1
on one of the files that shows a difference on each side. If those tools report different hash values then your copy is bogus.