rudu is a high-performance, Rust-powered replacement for the traditional Unix du command. It uses multithreading (rayon) for fast parallel directory traversal, reports true disk usage (st_blocks × 512), and adds filtering, CSV export, incremental caching, and memory limiting — all with Rust's memory-safety guarantees.
rudu # scan current directory
rudu /data --depth 2 --sort size # top 2 levels, largest first
rudu /project --exclude .git --output out.csv # exclude .git, export to CSV
rudu /lustre --memory-limit 900 --no-cache # HPC cluster with 1 GB job limitFor the full options reference and annotated examples, see docs/basic-usage.md.
- Parallel scanning — work-stealing thread pool via
rayon; configurable with--threads N - True disk usage —
st_blocks × 512, same asdu - Depth & exclusion filtering —
--depth N,--exclude PATTERN - Flexible output — terminal table or
--output report.csv - Owner & inode info —
--show-owner,--show-inodes - Incremental caching — skips unchanged subtrees on repeat scans;
--no-cache,--cache-ttl - Memory limiting —
--memory-limit MBfor HPC/SLURM jobs; graceful degradation at 95 % of limit - Performance profiling —
--profileprints per-phase timing
| Guide | Description |
|---|---|
| Basic Usage | Invocation syntax, all flags, annotated examples |
| Exclude Tutorial | Pattern exclusion in depth, with real-world examples |
| Performance Guide | Benchmarks, tuning, thread-pool strategy |
| Platform Support | macOS / Linux / BSD / Windows notes, RSS tracking |
| Directory | Files | du |
rudu |
Speedup |
|---|---|---|---|---|
| Small (1 K files) | ~1,000 | 0.010 s | 0.619 s | 0.02×* |
Medium (/usr/bin) |
~1,400 | 0.017 s | 0.015 s | 1.13× |
| Large (project) | ~10,000 | 0.106 s | 0.052 s | 2.04× |
* For very small directories, startup and threading overhead outweighs the benefit. Performance gains scale with directory size.
# From source
git clone https://github.com/greensh16/rudu.git
cd rudu
cargo build --release
cargo install --path .
# From crates.io
cargo install ruduContributions are welcome. For major changes please open an issue first.
cargo test
cargo fmt --check
cargo clippy --all-targets -- -D warnings
cargo doc --openGNU General Public License — see LICENSE.
Built with Rust · parallel processing via Rayon · CLI via Clap · progress via Indicatif · memory monitoring via sysinfo