“gdu” is a disk usage analyzer tool that provides a console interface for examining and understanding the disk usage on your system. It allows you to efficiently analyze how much disk space is being consumed by different directories and files.
With its console-based interface, gdu provides a lightweight and straightforward way to navigate through your file system and view disk usage information. The tool scans the specified directory or drive and generates a hierarchical representation of the disk usage, displaying the sizes of directories and files in a clear and organized manner.
gdu offers several features that make it a useful tool for disk analysis. It provides an intuitive and user-friendly interface, allowing you to explore the disk usage information easily. You can navigate through directories, view their sizes, sort them by size or name, and drill down into subdirectories to get a detailed breakdown of disk space consumption.
Additionally, gdu enables you to identify large files and directories that might be occupying significant disk space. By highlighting directories with the highest disk usage, it helps you pinpoint areas where disk space can be optimized or where unnecessary files can be deleted.
The console interface of gdu makes it particularly suitable for server environments or when working with remote systems through a terminal interface. It is lightweight and can quickly provide insights into disk usage without the need for a graphical user interface.
gdu Command Examples
1. Interactively show the disk usage of the current directory:
2. Interactively show the disk usage of a given directory:
# gdu /path/to/directory
3. Interactively show the disk usage of all mounted disks:
# gdu --show-disks
4. Interactively show the disk usage of the current directory but ignore some sub- directories:
# gdu --ignore-dirs /path/to/directory1,/path/to/directory2,...
5. Ignore paths by regular expression:
# gdu --ignore-dirs-pattern '.*[abc]+'
6. Ignore hidden directories:
# gdu --no-hidden
7. Only print the result, do not enter interactive mode:
# gdu --non-interactive /path/to/directory
8. Do not show the progress in non-interactive mode (useful in scripts):
# gdu --no-progress /path/to/directory
Overall, gdu simplifies the process of analyzing disk usage and helps you make informed decisions about managing and optimizing your disk space. Whether you are a system administrator, a developer, or a regular user, gdu can be a valuable tool for understanding and managing disk usage on your system.