explaingit

bootandy/dust

11,689RustAudience · ops devopsComplexity · 1/5Setup · easy

TLDR

Dust is a terminal tool that shows you which folders and files are eating your disk space, replacing the hard-to-read Unix `du` command with a color-coded tree and percentage bars.

Mindmap

mindmap
  root((dust))
    What it does
      Shows disk usage
      Visual bar chart
      Replaces du command
    Install options
      Cargo
      Homebrew
      Binary download
    Key options
      Depth limit
      Entry count limit
      JSON output
    Audience
      Developers
      Ops engineers
      Anyone with full disks
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Quickly find which directories are consuming the most disk space by running a single `dust` command instead of `du -h | sort -h`.

USE CASE 2

Drill down into a specific folder up to a configurable depth to trace large subdirectories down to the actual files taking up space.

USE CASE 3

Use `dust --json` to pipe disk-usage data into scripts or monitoring tools for automated disk-space reporting.

Tech stack

Rust

Getting it running

Difficulty · easy Time to first run · 5min

In plain English

Dust is a command-line tool that shows you where your disk space is going. It is a rewrite of the standard Unix utility called du (disk usage), built in Rust with the goal of being easier to read at a glance. You run dust in your terminal and it prints a tree of the largest directories and files, along with horizontal bars showing each entry's size as a fraction of its parent folder. The visual design is the main improvement over the original du. Standard du gives you raw numbers you have to mentally compare. Dust draws percentage bars and uses color to show which folders belong inside which parent, so you can trace a chain of large subdirectories down to the actual files consuming space without piping through sort or head. The README uses a screenshot where a target directory consumes 1.8 gigabytes: the bars immediately show that nearly all of that lives in one subdirectory, which in turn is mostly many small files rather than a single large one. The tool runs on Linux, macOS, and Windows and can be installed through Cargo (Rust's package manager), Homebrew, Snap, Scoop, Conda, or a downloaded binary. A single install script handles Linux and macOS automatically. Once installed, dust accepts a directory path or defaults to the current directory. Common options let you control how many entries to show (-n), how many levels deep to go (-d), whether to show only files or only directories, minimum file size to include, and filters based on filename patterns. Output can be printed as JSON for use with other tools. A config file at ~/.config/dust/config.toml stores default options so you do not have to repeat them every time. The project is a practical utility with no login, no server, and no configuration beyond an optional preferences file. If you regularly find yourself typing du -d 1 -h | sort -h to diagnose full disks, dust is meant to replace that habit.

Copy-paste prompts

Prompt 1
Install dust on macOS using Homebrew and show me how to find the top 10 largest directories in my home folder, showing 3 levels deep.
Prompt 2
Show me how to create a dust config file at ~/.config/dust/config.toml to always display only directories and limit output to 20 entries.
Prompt 3
Write a shell script that uses `dust --json` to alert me when any subdirectory in /var exceeds 5 GB.
Prompt 4
I keep running `du -d 1 -h | sort -h` to debug a full disk, show me the equivalent dust command and explain each flag.
Open on GitHub → Explain another repo

← bootandy on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.