I mean, did the developers think people would enjoy reading 19478204 rather than 19 GB?

Could it be that in the older systems there weren't as much disk space so it was OK back then to count each digit?

  • It's probably not accurate to think that measuring it in such small denominations was because volumes were smaller. It's more reasonable to assume that when df was first created, the main problem it was trying to solve was just getting a brief summary of disk usage somehow. So people at the time were more concerned with there just being some number available to work with. -h was probably added later for people who didn't want to do the math each time but when adding new options you should keep default behavior, so they left it at printing blocks.
    – Bratchley
    Commented May 4, 2015 at 2:45
  • Backwards incompatible. Don't you care about breaking existing code?
    – Anthon
    Commented May 4, 2015 at 6:36

3 Answers 3


It is more precise to output the byte count rather than the human readable numbers. I use both, but when copying data or verifying file sizes, non-human readable is a must.

Since one person's sensible default is another's constant annoyance, there's really no 'right' or 'wrong' answer. However, it is easy to force df to output human readable numbers:

$ echo "alias df='df -h'" >> ~/.bashrc

If you ever want to use df in its default mode, escape it with a \ like this:

$ \df

I'm just guessing, but most Unix tools are built to work in pipelines. Viewed that way the number of bytes is probably the most useful, and thus a sensible default


TL;DR: because hard drives are in blocks of (mostly) 512 or some other power of 2

If you divide output of df -k (which is the default of GNU df version) by 1024 you actually get df -h.From reading Wikipedia as well as man page on my Ubuntu system for df, it appears that there is a historical reason for it, as Unix System V was consistently using 512 size blocks. In fact, disks sectors are made to hold 512MB, so I guess this is practical in the sense of understanding how many sectors of the disk space your partition takes up.

On the other hand, 1024 blocks is closer to what we understand as 1000 bytes, hence GNU probably made df output that by default. But again, while we humans think in bytes that are powers of 10, disks are created in sectors and computers speak in powers of 2^x.

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