--- title: dust โ€” disk usage visualization date: 2026-10-18 time: 12:00 model: admin category: programs author_type: human summary: A du replacement tool that visualizes disk usage in a tree format. tags: program, Modern CLI Tools, dust --- **๐Ÿ’ฌ "dust Command"** dust is a **disk usage visualization** tool that displays disk usage in a tree format, serving as a replacement for du. It visualizes space usage per directory with bars. Unlike du, it sorts the results visually, showing the largest folders first. - **Concept**: Visualizes space usage per directory with bars. - **Key Features**: Unlike du, sorts the results visually, showing the largest folders first. - **Advantages**: Instantly identify folders consuming the most space. - **Usage**: Exclusion patterns can remove specific directories from the measurement. ## Installation and Download dust is installed via a package manager or the official script. | Environment | Command | | --- | --- | | Ubuntu / Debian | sudo apt install du-dust | | Fedora / RHEL | sudo dnf install dust | | Arch | sudo pacman -S dust | | macOS (brew) | brew install dust | | Rust cargo | cargo install du-dust | | Binary Download | github.com/bootandy/dust/releases | Verify the installation with `dust --version`. ## Frequently Used Options | Option | Description | | --- | --- | | -d 2 | Limit tree depth to 2 levels | | -n | Show number of files | | -X pattern | Exclude directories matching the pattern | | -r | Reverse the sort order | | --perspective | Show percentage of total usage | ## 3 Essential Command Combinations - `dust -d 2 /var` โ€” Check usage under /var up to 2 levels deep - `dust -X node_modules .` โ€” Measure excluding node_modules - `dust -n /home` โ€” Check usage with file count **๐Ÿ’ฌ "Show me an example of using dust on an actual server"** Here's a step-by-step guide for common scenarios encountered on production servers. ### Step 1 ยท Verify Installation Check if it is installed. ``` dust --version || sudo apt install -y du-dust ``` ### Step 2 ยท Check Root Entirely Find the cause of a full disk. ``` dust -d 1 / ``` ### Step 3 ยท Specific Directory Check details of the log directory. ``` dust -d 2 /var/log ``` ## Actual Execution Screen Result of checking disk root usage with dust. It displays the largest folders first as bars. ![dust command execution result](https://games.aidebatehub.com/assets/dust-demo.png) Actual production server ## How It's Used in Practice ### 1. Check Before Log Cleanup **Situation** โ€” Check if logs are consuming a lot of space. ``` dust -d 2 /var/log ``` **Result** โ€” You can see that nginx/access.log accounts for most of it. **Point** โ€” Cleanup is only possible after identifying what's consuming the space. ### 2. Inspect Backup Directory **Situation** โ€” Quickly check the size of backup folders. ``` dust /backup ``` **Result** โ€” Sizes of each backup folder are shown as bars. **Point** โ€” You can find and clean up old backups. ## Actual Execution Screen Result of checking the space distribution in the log directory. ![dust command execution result 2](https://games.aidebatehub.com/assets/dust-demo2.png) Actual production server ## Points to Note - dust requires measurement time. Scanning the entire root can take several minutes. - Using the -X option to exclude large directories like node_modules, .git makes the results more accurate. - On Debian/Ubuntu, the package name is du-dust. - Directories without permissions are excluded from measurement. --- Source (HTML): https://games.aidebatehub.com/programs/linux/modern/dust.html This file is an auto-generated Markdown twin of the DevHub document.