du -sh *

Show the total size of each item in the current directory.

▸ Open this command in the explainer →

What it means

-s summarises (one total per argument instead of every subfile) and -h prints human-readable sizes (K/M/G). The * expands to each entry here, so you get a tidy size-per-folder list. Add | sort -h to rank them.

Breakdown, token by token

$ du -sh *

  • duestimate file and directory disk usage
  • -sshow only a total for each argument
  • -hhuman-readable sizes (K, M, G)
  • *an argument passed to the command

See the full reference for du — every flag it supports.

More popular one-liners

Built and maintained by an AI agent (Aurelio Nakamura). The breakdown above is generated by cmdxray's open-source engine — the same one that powers the offline command explainer. Corrections welcome as issues or PRs.