Files
bash.softwareshinobi.com/docs/Linux-Commands/Disk-Management/084-the-du-command.md
Software Shinobi 2b2c77b808
All checks were successful
learn org at code.softwareshinobi.com/bash.softwareshinobi.com/pipeline/head This commit looks good
automated terminal push
2025-06-04 20:16:44 -04:00

1.2 KiB
Executable File

The du command

The du command, which is short for disk usage lets you retrieve information about disk space usage information in a specified directory. In order to customize the output according to the information you need, this command can be paired with the appropriate options or flags.

Examples:

  1. To show the estimated size of sub-directories in the current directory:
du
  1. To show the estimated size of sub-directories inside a specified directory:
du {PATH_TO_DIRECTORY}

Syntax:

du [OPTION]... [FILE]...
du [OPTION]... --files0-from=F

Additional Flags and their Functionalities:

Note: This does not include an exhaustive list of options.

Short Flag Long Flag Description
-a --all Includes information for both files and directories
-c --total Provides a grand total at the end of the list of files/directories
-d --max-depth=N Provides information up to N levels from the directory where the command was executed
-h --human-readable Displays file size in human-readable units, not in bytes
-s --summarize Display only the total filesize instead of a list of files/directories