dust
Visualize disk space usage
TLDR
Display information for the current directory
Display information about one or more directories
Display 30 directories (defaults to 21)
Display information for the current directory, up to 3 levels deep
Display the largest directories at the top in descending order
Ignore a file or directory
Do not display percent bars and percentages
SYNOPSIS
dust [OPTIONS] [PATH...]
PARAMETERS
-h, --human-readable
Display sizes in human-readable format (e.g., 1K, 234M, 2G). This is the default behavior.
-d, --depth
Limit the display to a certain directory depth, showing only items up to N levels deep from the starting path.
-x, --one-file-system
Exclude directories on different file systems. This prevents scanning network mounts or other partitions.
-L, --dereference
Follow symbolic links. By default, symbolic links are not followed.
-E, --exclude
Exclude files or directories matching the specified PATTERN. Multiple exclude patterns can be provided.
Example: dust -E "*.log"
-t, --threshold
Only show entries larger than the specified SIZE. Accepts human-readable sizes (e.g., 10M, 1G).
--total
Display a grand total disk usage at the bottom of the output.
-p, --progress
Show a progress bar while scanning the file system, useful for large directories.
-n, --no-color
Disable colored output, useful for scripts or terminals with limited color support.
-r, --reverse
Sort output in reverse order, displaying the smallest entries first.
--si
Use SI units (base 1000, e.g., KB, MB, GB) instead of binary units (base 1024, e.g., KiB, MiB, GiB).
DESCRIPTION
dust (Disk Usage Tree) is a command-line tool written in Rust that serves as a modern and more visually appealing alternative to the traditional du command. It provides a tree-like visualization of disk usage, making it easier to identify large files and directories at a glance. Key features include color-coded output for readability, human-readable sizes by default, efficient performance due to its Rust implementation, and the ability to filter and sort results. While du focuses on raw data, dust prioritizes user experience with its hierarchical and often more intuitive presentation of disk space consumption. It's particularly useful for quickly understanding disk space distribution.
CAVEATS
dust is not a standard Linux utility and must be installed separately (e.g., via a package manager like cargo
or apt
on some distributions). Its highly formatted, color-coded output is designed for human readability and may not be suitable for programmatic parsing, unlike the more consistent output of the traditional du command.
NCDU EXPORT MODE
dust includes an option (-X
or --ncdu-export
) to export the scan results in a JSON format compatible with ncdu, an ncurses-based disk usage analyzer. This allows users to generate data with dust's speed and then explore it interactively using ncdu's text-based graphical interface, combining the strengths of both tools.
HISTORY
dust is a relatively new command-line utility, developed in Rust to offer a modern, faster, and more user-friendly alternative to the long-standing du command. Its development began in the late 2010s, focusing on leveraging Rust's performance capabilities for efficient file system traversal and providing an improved visual experience for disk usage analysis, often featuring tree-like and color-coded outputs.