If you look at man units , you will see a description of two types of units. Decimal and binary. Decimal units such as Kilobyte (KB) and Megabyte (MB) are 1000 (10 ^ 3), while binary units such as Kibibyte (KiB) and Mebibyte (MiB) have a multiplicity of 1024 (2 ^ 10).
If the displayed device includes a binary prefix, such as KiB, MiB, GiB, you can be sure that it is 1024. For obscure units, the general rule of the thumb is:
- Hard drive sizes are advertised in decimal units because manufacturers want to make them larger. Accordingly, the size of files stored on disk and transferred over networks is generally consistent with this.
- Memory sizes advertised in binary units
- Everything that is not connected with the data (frequency in kHz, etc.) is always equal to decimal
Ubuntu published a policy in 2010 for its devices, which appears to be fairly consistent across Linux distributions, although it is not guaranteed:
Use base-10 for:
- network bandwidth (e.g. 6 Mbps or 50 kB / s)
- disk sizes (e.g. 500 GB hard drive or 4.7 GB DVD)
Use base-2 for:
- RAM sizes (e.g. 2 GB RAM)
There are two possibilities for file sizes:
- Show both base-10 and base-2 (in that order). For example, the Linux kernel: "2930277168 512-byte hardware sectors: (1.50 TB /1.36 TiB)"
- Show only base-10 or give the user the opportunity to choose between base-10 and base-2 (the default should be base-10).
source share