Skip to content

greensh16/rudu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

72 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rudu

workflow DOI

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.


Quick Start

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 limit

For the full options reference and annotated examples, see docs/basic-usage.md.


Features

  • Parallel scanning — work-stealing thread pool via rayon; configurable with --threads N
  • True disk usagest_blocks × 512, same as du
  • 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 MB for HPC/SLURM jobs; graceful degradation at 95 % of limit
  • Performance profiling--profile prints per-phase timing

Documentation

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

Benchmarks

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.


Installation

# From source
git clone https://github.com/greensh16/rudu.git
cd rudu
cargo build --release
cargo install --path .

# From crates.io
cargo install rudu

Contributing

Contributions are welcome. For major changes please open an issue first.

cargo test
cargo fmt --check
cargo clippy --all-targets -- -D warnings
cargo doc --open

License

GNU General Public License — see LICENSE.

Acknowledgments

Built with Rust · parallel processing via Rayon · CLI via Clap · progress via Indicatif · memory monitoring via sysinfo

About

rudu is a high-performance, Rust-powered replacement for the traditional Unix du (disk usage) command. It was built to provide a safer, faster, and more extensible alternative for scanning and analyzing directory sizes — especially for large-scale or deep filesystem structures.

Topics

Resources

License

Stars

Watchers

Forks

Contributors

Languages