Skip to content

Comment on Why is 1 GB equal to 10^9 bytes instead of 2^30?parent

Comments

Linux is all over the place. For example:

    $ dd if=/dev/zero of=/dev/null bs=1M count=1K
    1024+0 records in
    1024+0 records out
    1073741824 bytes (1.1 GB) copied, 0.157131 s, 6.8 GB/s
'dd' interprets command-line arguments "M" and "K" as 2^20 and 2^10 respectively, but when it reports the total amount copied, it uses the decimal GB (10^9). It also uses decimal SI units in the average speed calculation.

My favorite file manager, Thunar, reports file sizes in decimal units. Not sure if it's distro-specific, though.

Many other programs, like 'df', have a switch (--si) that turns decimal units on or off.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.