0

When we bought a N Giga Byte flash memory, the free space that the OS provide for us, is less than N GigaBytes. For example, for a 2 GB flash memory, total space that we can use, is 1.86 GB.

As far as I know, the difference is for metadata and filesystems. Is that right?

My question :

Is there any command or program in linux, to see or use whole the 2GB space? can I see those metadata and filesystems?

Appreciate your time and consideration.

5
  • you use df command? or any other? Aug 4, 2014 at 12:44
  • 1
    Please think as 2 x 1000 x 1000 / 1024 / 1024 Aug 4, 2014 at 12:46
  • I don't have any idea about your first comment. But about your second comment: what do you mean? :D As far as I know , 2 GB is 2 * 1024 Mega Byte. and 1024 MB is 1024*1024 Byte.! Aug 4, 2014 at 12:52
  • 1
    Crossposted on Unix & Linux Aug 4, 2014 at 12:53
  • 1
    Memory device manufacturers use the SI system prefixes and not binary prefixes. To them, 1GB is 1000 MB, 1MB=1000KB, 1KB=1000B. Thankfully, 1 Byte is still 8 bits.
    – muru
    Aug 4, 2014 at 14:23

1 Answer 1

0

Computers calculate numbers in base 2 (binary). The closest a computer can get to 1000 is 1024.

Manufacturers quote sizes in base 10, so from the manufacturer's point of view a 500GB drive is 500 * 1000 * 1000 * 1000 = 500000000000 bytes. Nice round figures.

From the computer's perspective, the same figure is 500 * 1024 * 1024 * 1024 = 536870912000 bytes. A quick glance at that result might suggest it's a 536GB capacity drive, but we know that's not the case because it physically can only hold 500GB.

So a 500GB drive will show up on a computer as only having 465.66GB of space.

No-one has lied - the drive really is 500GB in size (a kilo of anything is 1000, not 1024), it's just that the computer cannot represent that exactly in base 2, so we get the next nearest figure.

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