Esta página se muestra en inglés. Una traducción al español está en curso.
SkillsApr 13, 2026·3 min de lectura

dust — A More Intuitive Version of du in Rust

dust (du + Rust = dust) is a modern replacement for the du disk usage command. It provides a visual, color-coded tree view of directory sizes, instantly showing which folders and files consume the most disk space.

Listo para agents

Instalación con revisión previa

Este activo requiere revisión. El prompt copiado pide dry-run, muestra escrituras y continúa solo tras confirmación.

Needs Confirmation · 64/100Política: confirmar
Superficie agent
Cualquier agent MCP/CLI
Tipo
Skill
Instalación
Single
Confianza
Confianza: Established
Entrada
step-1.md
Comando con revisión previa
npx -y tokrepo@latest install 82d22b5a-3745-11f1-9bc6-00163e2b0d79 --target codex

Primero dry-run, confirma las escrituras y luego ejecuta este comando.

TL;DR
dust shows disk usage as a color-coded visual tree, instantly revealing the largest directories.
§01

What it is

dust (du + Rust = dust) is a modern replacement for the du disk usage command. It provides a visual, color-coded tree view of directory sizes, instantly showing which folders and files consume the most disk space.

dust is part of the Rust CLI renaissance alongside bat, fd, ripgrep, and eza: modern, fast alternatives to traditional Unix tools. It answers 'what is using all my disk space?' in a single command without piping through sort and head.

§02

How it saves time or tokens

Traditional du requires piping through sort and head to find the largest directories: du -sh * | sort -rh | head -20. ncdu requires interactive navigation. dust shows everything in a single command with proportional visual bars. The output is instantly readable without scrolling or interaction. For AI agents analyzing disk usage, dust's structured output is more parseable than du's raw numbers.

§03

How to use

  1. Install dust:
brew install dust              # macOS
cargo install du-dust           # From source
  1. Show disk usage of the current directory:
dust
  1. Common options:
dust -n 10              # Show only top 10 entries
dust /home/user          # Show specific directory
dust -r                  # Reverse order (smallest first)
dust -s                  # Show apparent size (not disk usage)
dust -d                  # Only show directories (not files)
dust -X .git -X node_modules  # Exclude directories
§04

Example

Typical dust output showing proportional bars:

$ dust -n 8

  4.2G ┌── node_modules      ████████████████████████████████ 48%
  2.1G ├── .git               ████████████████ 24%
  1.0G ├── dist                ████████ 11%
512.0M ├── data                ████ 6%
256.0M ├── logs                ██ 3%
128.0M ├── assets              █ 1%
 64.0M ├── docs                █ 1%
 32.0M ├── src                  0%
  8.8G   ┌── .
§05

Related on TokRepo

§06

Common pitfalls

  • Running dust on the root directory without --depth limit produces an overwhelming amount of output. Use -n to limit entries or -d to hide files.
  • dust shows disk usage by default, which differs from apparent file size due to filesystem block allocation. Use -s for apparent size if you need the actual file sizes.
  • On macOS, some system directories require sudo to scan. Run sudo dust /Library if you need to audit system storage.

Preguntas frecuentes

How does dust differ from du?+

dust provides a visual, color-coded tree with proportional bars. du outputs raw numbers that require piping through sort and head. dust is significantly more readable for finding the largest directories at a glance.

How does dust compare to ncdu?+

ncdu is interactive and requires navigating through directories manually. dust shows the full picture in a single non-interactive command. For scripting and quick lookups, dust is faster. For deep exploration, ncdu offers more interactivity.

Can I exclude directories from the scan?+

Yes. Use the -X flag to exclude directories: dust -X .git -X node_modules. This is useful for excluding known large directories that are not relevant to your analysis.

What platforms does dust support?+

dust runs on macOS, Linux, and Windows. Install via Homebrew (macOS), cargo (all platforms), or download pre-built binaries from the GitHub releases page.

Is dust fast on large filesystems?+

Yes. Written in Rust, dust scans directories efficiently using parallel I/O. It is faster than du on most filesystems and handles large directory trees without issues.

Referencias (3)

Discusión

Inicia sesión para unirte a la discusión.
Aún no hay comentarios. Sé el primero en compartir tus ideas.

Activos relacionados