Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

what is the size unit for used, Available and what does 1K-blocks mean here does it say that size is always in kB?

command: df -k | head -2


Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/sda7              9920592   1054440   8354084  12% /
share|improve this question
up vote 2 down vote accepted

From man df:

Display values are in units of the first available SIZE from --block-size, and the DF_BLOCK_SIZE, BLOCK_SIZE and BLOCKSIZE environment variables. Otherwise, units default to 1024 bytes (or 512 if POSIXLY_CORRECT is set).

SIZE may be (or may be an integer optionally followed by) one of following: KB 1000, K 1024, MB 1000*1000, M 1024*1024, and so on for G, T, P, E, Z, Y.

The -k switch is equal to --block-size=1K, which means that the numbers are in multiples of 1024 bytes.

share|improve this answer
Two environment variables also affect this, along with find, du, df, ls and others... BLOCKSIZE=1K sets the default as if you used the '-k' or '--block-size=1K' options, while the BLOCK_SIZE (note the underscore) does the same, but has some other options available. I set my BLOCK_SIZE to \'1 (backslash,single-quote,one) which causes find,du,df,ls (and others) to display using COMMAS!!! So much easier to parse! – lornix Jun 21 '12 at 8:56
So does it mean 9920592 kB, 1054440 kB? – Abhishek Simon Jun 21 '12 at 9:05
@AbhishekSimon Yes. You can check by dividing the numbers by 1048576 (1024*1024) and seeing if they match the output of df -h. – Indrek Jun 21 '12 at 9:08

Yes, you are right, as the doc says:

 -k      Use 1024-byte (1-Kbyte) blocks, rather than the default.  Note
         that this overrides the BLOCKSIZE specification from the environ-
share|improve this answer
Question: "What is the unit?" Your answer: "Yes". Huh??? – sawdust Jun 21 '12 at 19:28
To that he guessed. – iMom0 Jun 22 '12 at 0:49

You must log in to answer this question.

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