Size of directory:

  • current directory in total:
    du -sh

    shows whole size of files in directory and subdirectories

  • details about subdirectories:
    du -sh *

    shows details about subdirectories

  • top N biggest files/ subdirectories in directory:
    • shows size in bytes:
      du -b|sort -nr|head -n 10
    • shows size in human readable form:
      du -h|sort -hr|head -n 10

With switch “-a” command “du” shows also all deeper level of subdirectories so we can see in results total size of subdirectory and also sizes its sub-subdirectories.