Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Applications on Ubuntu use different file size units. Binary units are multiples of 1024, whereas decimal units are multiples of 1000.

Which applications on Ubuntu use which system?

share|improve this question
    
seems to me this is an endless list? Not sure how you can answer this? –  Nanne Nov 27 '12 at 17:19
    
OK, let's narrow it down to ones you would typically use when performing these activities: creating, deleting or modifying partitions, using LVM, measuring free disk space and deleting unused files. When I was learning LVM, I would have loved a list like this. It was such a pain to have to experiment with each utility manually to find out what units they were actually using. Man pages and help documents often don't mention it. –  Flimm Nov 27 '12 at 17:24

1 Answer 1

up vote 2 down vote accepted

Intro:

Before reading this answer, make sure you understand what the different units and the different systems are. This is a quick reminder.

The IEC units are 1KiB (1024 bytes), 1MiB, 1GiB and so on. The SI units are 1kB (1000 bytes), 1MB, 1GB and so on. Ubuntu's unit policy mandates that IEC and SI units be used only.

The traditional units are 1KB (1024 bytes), 1MB, 1 GB and so on. Ubuntu's unit policy only allows using them for backwards compatability.

I'm making this answer a community wiki, so please add applications to the list and keep it up-to-date!

Graphical applications:

  • GNOME System Monitor follows Ubuntu's unit policy, using IEC units.
  • Nautilus follows Ubuntu's unit policy, using SI units. The properties dialog helpfully converts into bytes as well.
  • GNOME Disks follows Ubuntu's unit policy, using SI units, helpfully converting into bytes as well.
  • Disk Usage Analyser (baobab) follows Ubuntu`s unit policy, using SI units.
  • GParted follows Ubuntu's unit policy, using IEC units.
  • system-config-lvm uses the traditional system. (bug report)
  • Firefox uses the traditional system. (bug report)

Command-line applications:

  • ls uses the traditional system, but has an --si option.
  • du uses the traditional system, but has an --si option.
  • df uses the traditional system, but has an --si or -H option.
  • fdisk uses the traditional system
  • fparted uses the traditional system
  • lvextend and other commands belonging to the LVM allow you to choose between binary and decimal units, depending on whether you use lower-case or upper-case letters. See the man page for lvs, for example. The man pages aren't as clear as they could be. (bug report)
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.