du

Linux · System · available in the simulator

What it does

Estimate file or directory space usage.

Syntax

du [opciones] [archivo...]

Options and parameters

  • -a

    Include files as well, not just directories.

  • -b

    Apparent size in bytes.

  • -c

    Produce a grand total line.

  • -h

    Print sizes in human-readable format.

    du -h
  • -s

    Display only a total for each argument.

    du -sh /var/log
  • --max-depth

    Limit the depth of directories displayed.

    du -h --max-depth=1

Usage examples

  • du -h archivo
  • du -sh carpeta
  • du -ah .
  • du -sh .
  • du -ah --max-depth=1 /var
  • du -h
  • du -sh /var/log
  • du -h --max-depth=1
Practise du

Related commands