I have just transferred (via scp) a bunch of .gz files from a Windows machine to my Linux machine. They are large files so I checked they had transferred entirely by comparing file sizes. Those that I have copied on to my Linux are listed as being 0.097% larger than the originals on the Windows machine. I'm curious as to what is causing this discrepancy? I used ls -l on the Linux and just looked at the Properties on the Windows for file size info.
1 Answer
Maybe because Windows shows file sizes in kbs, mbs, gbs, ... While linux shows them in kibs, mibs, gibs...?
One kb is 1000 bytes, while one kib is 1024 bytes, and one mib 1024 kibs.
Other possible reason is probably metadata.
I am not sure however, because both of those reasons would suggest smaller file sizes in linux than in windows.
Of course the problem may be the minimum data block size (if you have 4kib data blocks and 1kib file, it's going to take 4kib of place on disk). However, I don't think this should impact the shown file size or that it would matter all that much in big files.
md5sum [filename]
on both the source file and the copy should tell you if they have the same bytes. After that you can try to figure why you have a difference.