dust
Overview
dust is an intuitive, visual replacement for du written in Rust. It presents directory sizes as a tree-based bar chart, allowing quick identification of large files and folders consuming disk space.
Syntax
dust [options] [path...]Common Options
| Option | Description |
|---|---|
-d NUM, --depth NUM |
Limit directory depth traversal |
-n NUM, --number-of-lines NUM |
Limit output to top NUM lines |
-r, --reverse |
Reverse sort order |
-i, --ignore-hidden |
Do not include hidden files in calculations |
-e PATTERN, --filter PATTERN |
Exclude files matching regex pattern |
Key Use Cases
- Finding disk space hogs visually inside directory trees.
- Limiting depth scans for faster directory analysis (
-d). - Excluding temporary build folders from storage breakdown (
-e).
Examples with Explanations
Example 1: Basic Usage
dustScans the current directory and renders a terminal bar chart of disk usage.
Example 2: Depth Limit Scan
dust -d 2 /var/logAnalyzes disk usage under /var/log up to 2 directory levels deep.