![Forrest logo](/images/logo.png)
gdu:tldr:3502a
The "gdu" command is commonly used in Linux-based operating systems, and it stands for "GNU Disk Usage." It is a tool used to analyze disk space usage on a Linux system.
When you run the "gdu" command, it scans the directory you specify (or, if not specified, the current directory) and provides a summary of disk usage in a human-readable format. It calculates the size of each directory and file within the specified directory and displays the total size in bytes, kilobytes, megabytes, or gigabytes.
The "gdu" command helps you identify which directories or files are consuming the most disk space on your system. It can be helpful for managing disk space and optimizing storage usage.
Here are a few options that can be used with the "gdu" command:
- "-d" or "--max-depth=N": Limits the depth of the scan to the specified level. For example, "gdu -d 2" will display disk usage up to two directory levels deep.
- "-h" or "--human-readable": Display sizes in human-readable format (e.g., KB, MB, GB).
- "-s" or "--summarize": Display only the total size of the specified directory without listing all the subdirectories.
- "-x" or "--one-file-system": Limits the scan to the current file system and does not cross filesystem boundaries.
Please note that the "gdu" command may not be available by default on all Linux distributions, but it can typically be installed from the distribution's package manager.