The du command is used to display files and directories sizes.
The name stands for Disk Usage.
du [flags] [file1] [file2] [directory1] ...

Flags

  • -a: shows the size of each individual file inside a given folder, not the folder total size.
  • -c: shows the total size of all the files passed as arguments
  • -d: select the max depth of folder recursion
  • -h: shows the sizes in an human-readable format
  • -g: shows the sizes with GB units
  • -m: shows the sizes with MB units
  • -k: shows the sizes with KB units