bootandy /dust

A more intuitive version of du in rust

★ 12,575⑂ 308👁 37⑃ 312● 245▤ 52
RustCreated 2018-03-17
12,575
stars
+0+1+83
308
forks
37
watchers
312
prs
245
issues
52
releases
–
discussions

README

Dust

du + rust = dust. Like du but more intuitive.

 Why

Because I want an easy way to see where my disk is being used.

 Demo


  



Study the above demo

 We cd into a webapp it is 72K in size.

 We see 32K in the src folder. Note the bar jumps to 44%. Half of the webapp is in src

 We see 8K in the src/utils. The bar jumps down to 11% but a shadow stays at 44% showing that it is part of the src folder

 We then demo the -d 2 flag - Show a depth of 2 folders

 We demo the -n 5 flag - Show only 5 items (by default we show terminal height items)



 Install

 Quick Install (Linux, macOS, Windows) 
bash
curl -sSfL https://raw.githubusercontent.com/bootandy/dust/refs/heads/master/install.sh | sh


 Cargo 

 Cargo

- cargo install du-dust

 🍺 Homebrew (Mac OS)

- brew install dust

 🍺 Homebrew (Linux)

- brew install dust

 DNF (Fedora Linux)

- sudo dnf install du-dust

 Snap Ubuntu and supported systems

- snap install dust

Note: dust installed through snap can only access files stored in the /home directory. See danie-dejager/dust-snap2 for more information.

 mise

- mise use -g dust

 Pacstall (Debian/Ubuntu)

- pacstall -I dust-bin

 Anaconda (conda-forge)

- conda install -c conda-forge dust

 deb-get (Debian/Ubuntu)

- deb-get install du-dust

 x-cmd

- x env use dust

 Windows:

- scoop install dust
- Windows GNU version - works
- Windows MSVC - requires: VCRUNTIME140.dll

 Download

- Download Linux/Mac binary from Releases
- unzip file: tar -xvf _downloaded_file.tar.gz
- move file to executable path: sudo mv dust /usr/local/bin/

 Overview

Dust is meant to give you an instant overview of which directories are using disk space without requiring sort or head. Dust will print a maximum of one 'Did not have permissions message'.

Dust will list a slightly-less-than-the-terminal-height number of the biggest subdirectories or files and will smartly recurse down the tree to find the larger ones. There is no need for a '-d' flag or a '-h' flag. The largest subdirectories will be colored.

The different colors on the bars: These represent the combined tree hierarchy & disk usage. The shades of grey are used to indicate which parent folder a subfolder belongs to. For instance, look at the above screenshot. .steam is a folder taking 44% of the space. From the .steam bar is a light grey line that goes up. All these folders are inside .steam so if you delete .steam all that stuff will be gone too.

If you are new to the tool I recommend to try tweaking the -n parameter. dust -n 10, dust -n 50.

 Usage


Usage: dust
Usage: dust 
Usage: dust    
Usage: dust -p (full-path - Show fullpath of the subdirectories)
Usage: dust -s (apparent-size - shows the length of the file as opposed to the amount of disk space it uses)
Usage: dust -n 30  (Shows 30 directories instead of the default [default is terminal height])
Usage: dust -d 3  (Shows 3 levels of subdirectories)
Usage: dust -D (Show only directories (eg dust -D))
Usage: dust -F (Show only files - fin

Snapshot: 2026-11-04T14:00:00Z · Data license Apache-2.0 · JSON