gitmyhub

dust

Rust ★ 12k updated 3mo ago

A more intuitive version of du in rust

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.

Rustsetup: easycomplexity 1/5

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.

Where it fits