| Crates.io | acme-disk-use |
| lib.rs | acme-disk-use |
| version | 0.3.0 |
| created_at | 2025-11-03 20:47:43.631177+00 |
| updated_at | 2025-12-03 09:51:40.395078+00 |
| description | Fast disk usage analyzer with intelligent caching for incremental write workloads |
| homepage | https://github.com/blackwhitehere/acme-disk-use |
| repository | https://github.com/blackwhitehere/acme-disk-use |
| max_upload_size | |
| id | 1915254 |
| size | 172,031 |
Disclaimer: This is alpha software. Interfaces and cache formats may change without notice.
A replacement for du that:
mtimerayone.g. a directory of model outputs each writing its output to a new daily data directory
mtime or under which a sub-directory was modified (no matter how nested)~/.cache/acme-disk-use/acme-disk-use exploits a write pattern where applications write immutable files into incrementally-created nested directories—to dramatically outperform du on repeated scans.
Traditional tools like du traverse the entire directory tree on every invocation, stat-ing and summing every file regardless of whether anything changed. For large trees with hundreds of thousands of files, this becomes prohibitively expensive.
acme-disk-use takes a different approach:
Because immutable-file workloads rarely modify old directories, the vast majority of the tree remains unchanged between scans. This means:
The result: acme-disk-use with a warm cache is ~10x faster than du on typical workloads (see benchmark results below), since it avoids re-reading files that haven't changed.
Install the latest stable version from crates.io:
cargo install acme-disk-use
Download pre-built binaries for your platform from the Releases page:
Linux (x86_64):
wget https://github.com/blackwhitehere/acme-disk-use/releases/latest/download/acme-disk-use-linux-x86_64
chmod +x acme-disk-use-linux-x86_64
sudo mv acme-disk-use-linux-x86_64 /usr/local/bin/acme-disk-use
macOS (Intel):
curl -LO https://github.com/blackwhitehere/acme-disk-use/releases/latest/download/acme-disk-use-macos-x86_64
chmod +x acme-disk-use-macos-x86_64
sudo mv acme-disk-use-macos-x86_64 /usr/local/bin/acme-disk-use
macOS (Apple Silicon):
curl -LO https://github.com/blackwhitehere/acme-disk-use/releases/latest/download/acme-disk-use-macos-aarch64
chmod +x acme-disk-use-macos-aarch64
sudo mv acme-disk-use-macos-aarch64 /usr/local/bin/acme-disk-use
Windows:
Download acme-disk-use-windows-x86_64.exe from the releases page and add it to your PATH.
Clone the repository and build from source:
git clone https://github.com/blackwhitehere/acme-disk-use.git
cd acme-disk-use
cargo build --release
# Binary will be at target/release/acme-disk-use
acme-disk-use --version
acme-disk-use --help
Scan current directory (output in 1K blocks like du):
acme-disk-use
Scan a specific directory:
acme-disk-use /path/to/directory
Human-readable output (-h):
acme-disk-use -h /path/to/directory
Show raw bytes (-b):
acme-disk-use -b /path/to/directory
Summarize (-s):
acme-disk-use -s /path/to/directory
Ignore cache and scan fresh:
acme-disk-use --ignore-cache /path/to/directory
Show timing statistics and file count:
acme-disk-use --stats /path/to/directory
Clean the cache:
acme-disk-use clean
Show help:
acme-disk-use --help
Display an interactive TUI showing cached directory sizes (similar to ncdu):
acme-disk-use cache show
Show a specific cached path:
acme-disk-use cache show /path/to/directory
Custom cache location:
Set the ACME_DISK_USE_CACHE environment variable:
export ACME_DISK_USE_CACHE=/custom/path/to/cache/
acme-disk-use /path/to/directory
Or use it inline:
ACME_DISK_USE_CACHE=/tmp/path/to/cache/ acme-disk-use /path/to/directory
Default cache location:
ACME_DISK_USE_CACHE is not set, defaults to ~/.cache/acme-disk-use on Unix systems./cache.bin if home directory is not available# Scan data directory (default: 1K blocks like du)
$ acme-disk-use data
1294336data
# Human-readable output (like du -h)
$ acme-disk-use -h data
1.2Gdata
# Show exact byte count (like du -b)
$ acme-disk-use -b data
1342177280data
# Force fresh scan without using cache
$ acme-disk-use --ignore-cache data
1294336data
# Clear all cached data
$ acme-disk-use clean
Cache cleared successfully.
# View cached directory sizes in an interactive TUI
$ acme-disk-use cache show
Performance comparison scanning ~220,000 files (nested directory structure):
| Method | Avg Time (ms) | Notes |
|---|---|---|
| Rust (Warm Cache) | 36.06 | Instant result from cache |
| Rust (Cold Cache) | 4459.78 | Initial scan + cache write |
| du | 4861.26 | Standard traversal |
Note: Rust (warm cache) is ~135x faster than
duin this scenario.
cargo check
cargo fmt
cargo build
RUST_LOG=debug cargo run
cargo doc --open
cargo test
Relies on criterion library
cargo bench
Install samply: https://github.com/mstange/samply
cargo build --profile profiling
samply record target/profiling/acme-disk-use
Install clippy: rustup component add clippy
cargo clippy --all-targets --all-features -- -D warnings
We welcome contributions! Please see CONTRIBUTING.md for detailed guidelines.
Quick Start:
git checkout -b feature/your-featurecargo testcargo fmtcargo clippy --all-targets --all-features -- -D warningsmain branchThis project uses GitHub Actions for continuous integration and deployment:
pipeline.yml): Handles both CI and Releases
main and on pull requests
cargo fmt)cargo clippy)v0.1.0)
Creating a Release:
# Update version in Cargo.toml and CHANGELOG.md
git tag v0.2.0
git push origin main --tags
Licensed under the Apache License, Version 2.0. See LICENSE for details.