0

What is the command to list the amount of blocks used by your home directory and everything under it? Only one number, not a whole list of them.

1 Answers1

0

Like this:

du -s --block-size=$MY_BLOCK_SIZE $HOME

Of course, replace $MY_BLOCK_SIZE with the block size you want to use, or omit the --blocksize=$MY_BLOCK_SIZE argument if you want to use the default of 1024 bytes/block:

   Display  values  are  in units of the first available SIZE from --block-size, and the
   DU_BLOCK_SIZE, BLOCK_SIZE and  BLOCKSIZE  environment  variables.   Otherwise,  units
   default to 1024 bytes (or 512 if POSIXLY_CORRECT is set).
jayhendren
  • 8,384
  • 2
  • 33
  • 58