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.

  • 2
    Before you try to find out why the OS thinks the files are difference sizes you should make sure they are in fact the same file. You can do this with a 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. Commented May 23, 2016 at 16:36
  • 2
    Can you tell us exactly the output given, esp. the numbers shown?
    – ilkkachu
    Commented May 23, 2016 at 16:48

1 Answer 1


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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .