Forrest logo
back to the gdu tool

gdu:tldr:3502a

gdu: Interactively show the disk usage of the current directory.
$ gdu
try on your machine

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.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the gdu tool