Why Same File Shows Different Sizes in Different Operating Systems

12,787

Windows assumes that there are 1024 Bytes in a Kilobyte unit, and 1024 Kilobytes in a Megabyte unit. While Ubuntu assumes, a 1000 bytes constitute a Kilobyte (KB) unit, 1000 Kilobytes for a Megabyte (MB) and so on.

Windows is using the ‘binary prefix’, and Ubuntu or GNU/Linux, is using it in its ‘proper’ foam.

The IEC and NIST standardized, and changed the symbols into …

In usage, products and concepts typically described using powers of 1024 would continue to be, but with the new IEC prefixes.

For example, a memory module of 536870912 bytes (512×1048576) would be referred to as 512 MiB or 512 mebibytes instead of 512 MB or 512 megabytes. Conversely, since hard drives have historically been marketed using the SI convention that “giga” means 1000000000, a “500 GB” hard drive would still be labeled as such.

According to these recommendations, operating systems and other software would also use binary and SI prefixes in the same way, so the purchaser of a “500 GB” hard drive would find the operating system reporting either “500 GB” or “466 GiB“, while 536870912 bytes of RAM would be displayed as “512 MiB”.wikipedia

So to answer your first question, use the size that's based on the fact that a MB is 1024KB. As far as the second question, I'm not aware of such a tool.

Share:
12,787

Related videos on Youtube

Saurav Kumar
Author by

Saurav Kumar

Pursued Master in Computer Application from SRM University. Python and Django full stack developer. You know you're in love when you can't fall asleep because reality is finally better than your dreams..

Updated on September 18, 2022

Comments

  • Saurav Kumar
    Saurav Kumar over 1 year

    I want to give some scenarios:

    • A movie file shows 700 MB in Windows but it shows around 735 MB in Ubuntu, which is in my drive having NTFS partition. Similarly another file shows 446 MB in Windows but 467 MB in Ubuntu.

    • Also when I download files from internet they change once downloaded in Ubuntu but do not change in Windows.

    • I generally have to upload torrents mentioning the file sizes. Most of the time I use Ubuntu, I use Windows to play games only.

    Actually my questions are:

    • Which size should I mention while creating torrents?
    • Is there any tool or software or formula to calculate the file size in Ubuntu equivalent to file size in Windows?

    I have already tried following links but could not find my actual answers:

    • endolith
      endolith over 7 years
      because Windows is wrong
  • h3.
    h3. over 10 years
    On the command line, du -h filename shows the size in kiB/MiB/GiB (1024 increments) and du -h --si filename shows the size in kB/MB/GB (1000 increments). I have no idea how to do this in the GUI.
  • Saurav Kumar
    Saurav Kumar over 10 years
    @Mitch: Thanks for a great conceptual answer. The link was simply awesome..
  • Saurav Kumar
    Saurav Kumar over 10 years
    @Gilles: you simply solved my issue.. That command works great and at least help me to get the file size in standard format. Yes I was also not able to find any GUI but that is not my problem now.