repobenchmarks // rust storage utilities
CLI TOOLS
$ dust -d 2 /var/lib/docker

dust (du + rust)

A modern, graphical replacement for du that visualizes which subdirectories and files are consuming your disk with intuitive terminal bar graphs.

Language: Rust Visualization: In-Terminal Bar Charts Stars: >8,000
14.2 GB ── █ 75% docker/overlay2 3.1 GB ── █ 15% postgres/data 1.8 GB ── █ 8% var/log/journal

When an alert triggers saying a server's root partition is 95% full, running standard du -sh * | sort -h is painfully slow and produces an unformatted wall of numbers. You have to repeatedly run commands, change directories, and recalculate sizes manually. dust (written in Rust by Andy Boot) gives you an immediate graphical tree breakdown with color-coded bar charts, letting you spot the culprit in a single glance.

Key Features

  • Visual Proportional Bars: Renders inline ASCII bar graphs illustrating exactly what percentage of a parent folder each subdirectory consumes.
  • Smart Inverted Layout: Places the largest directories at the very bottom of the terminal output, ensuring you never have to scroll backwards to see what's consuming disk space.
  • Depth Limiting (-d): Restrict the recursion depth (e.g. dust -d 2) to get a clean high-level overview without drowning in individual file details.

dust Parallel Scanning & Tree Aggregation

dust Scanning Architecture Shows multi-threaded directory walking aggregating byte counts into an inverted terminal tree structure. dust /var Terminal Invocation Multi-Threaded Walker Traverses inodes concurrently Aggregates Subtree Weights Inverted Visual Tree Biggest hogs at terminal bottom

Useful `dust` Command Flags

Flag Purpose Example Command
-d <depth> Limit directory tree depth dust -d 2
-n <count> Show top N largest items only dust -n 10
-X <pattern> Exclude specific paths dust -X .git
⚠ Permission Gotcha: Running as Root for `/var`

When diagnosing disk space issues on servers across system directories like /var/lib/docker or /var/log, running dust as a standard user will result in Permission denied warnings, causing directories to be omitted from calculation and giving misleadingly small totals. Always run with sudo dust / when investigating root disk usage.

Learn more and download binaries on the official dust GitHub repository.