Forrest logo
tool overview
On this page you find all important commands for the CLI tool du. If the command you are looking for is missing please ask our AI.

du

Summarize device usage of the set of FILEs, recursively for directories.

List of commands for du:

  • du:tldr:048a1 du: List the human-readable sizes of a directory and any subdirectories, up to N levels deep.
    $ du -h -d ${2} ${path-to-directory}
    try on your machine
    explain this command
  • du:tldr:27662 du: List the sizes of a directory and any subdirectories, in human-readable form (i.e. auto-selecting the appropriate unit for each size).
    $ du -h ${path-to-directory}
    try on your machine
    explain this command
  • du:tldr:68994 du: List the human-readable sizes of a directory and of all the files and directories within it.
    $ du -ah ${path-to-directory}
    try on your machine
    explain this command
  • du:tldr:87c2b du: List the sizes of a directory and any subdirectories, in the given unit (B/KiB/MiB).
    $ du -${select} ${path-to-directory}
    try on your machine
    explain this command
  • du:tldr:c7287 du: List the human-readable size of all `.jpg` files in subdirectories of the current directory, and show a cumulative total at the end.
    $ du -ch ${*-*-jpg}
    try on your machine
    explain this command
  • files:directory:list:size List the human-readable sizes of a directory and any subdirectories, up to N levels deep.
    $ du -h --max-depth=N ${path-to-directory}
    try on your machine
    explain this command
  • files:directory:sort:size List all folders and order them by size.
    $ du -h --max-depth=1 | sort -hr
    try on your machine
    explain this command
  • linux:files:directory:size Return the size a of given directory.
    $ du -sh ${directory}
    try on your machine
  • nix-store:tldr:7bbfe Calculate the total size of a certain store path with all the dependencies.
    $ du -cLsh $(nix-store --query --references ${-nix-store----})
    try on your machine
    explain this command
  • numfmt:tldr:152c1 numfmt: Convert to IEC units, pad with 5 characters, left aligned.
    $ du -s * | numfmt --to=${iec} --format="${%-5f}"
    try on your machine
    explain this command
tool overview