276c6404a996d230915e941db4beea8cf373260f
- Implemented multi-threaded directory traversal using ignore::WalkParallel - Added dynamic thread allocation for balanced CPU utilization - Refactored core logic to single-pass, in-memory tree construction (O(N)) - Added --compare, --units, and --precision flags - Established SCM-neutral distribution pipeline (Makefile, release.sh, Homebrew) - Comprehensive updates to README.md, MANUAL.md, and CHANGELOG.md - Decoupled from SCM-specific workflows
Sized
A fast, concurrent, and feature-rich command-line tool for visualizing disk usage, written in Rust.
Features
- Fast & Concurrent: Uses
rayonto process directories in parallel, making it extremely fast on modern multi-core systems. - Rich Output: Beautifully formatted tables with colors, distinguishing files and directories.
- Physical vs logical: Clearly separates Apparent Size (logical) from Disk Usage (actual blocks), essential for cloud files and sparse storage.
- Unit Selection: Switch between Binary (IEC) and Decimal (SI) unit systems via
--units. - Precision control: Configure decimal places using
--precision. - Advanced Filtering: Filter by minimum size (
-m 10MB) to find large items quickly. - Sorting: Flexible sorting by name, type, size (apparent), or blocks (usage) (
--sort). - Gitignore Support: Respects
.gitignoreand.ignorefiles to keep output clean (-i). - Export Options: Export data to CSV or JSON for further analysis (
--format csv/json). - Save to File: Automatically save reports with timestamped filenames (
--save).
Installation
🚀 Direct Download (macOS & Linux)
Download the latest archive for your architecture from the Releases page.
-
Extract the archive:
tar -xzf sized-v0.2.0-Darwin-arm64.tar.gz -
Install Binary & Man Page:
# Move binary to path sudo mv sized /usr/local/bin/ # Install man page sudo mkdir -p /usr/local/share/man/man1 sudo cp sized.1 /usr/local/share/man/man1/ -
macOS Security (Gatekeeper): Since the binary isn't code-signed for the App Store, macOS may block it. To allow it:
sudo xattr -d com.apple.quarantine /usr/local/bin/sizedAlternatively, run
sizedonce, let it fail, then go to System Settings > Privacy & Security and click "Allow Anyway".
🍺 Homebrew (macOS & Linux)
If you have a homebrew tap:
brew install gamertan/tap/sized
📦 Debian / Ubuntu (.deb)
- Download the
.debpackage from the Releases page. - Install using
dpkg:sudo dpkg -i sized_0.2.0_amd64.deb
🦀 From Source (Rust toolchain required)
git clone https://gitea.speelman.ca/gamertan/sized.git
cd sized
make install # Installs binary and man page
Alternatively, via Cargo:
cargo install --path .
Documentation
- Manual: Detailed explanations of all flags and features.
- Man Page: Standard unix man pages (installed via
make install).
Usage
Basic Usage
Analyze the current directory:
sized
Analyze a specific path:
sized /path/to/directory
Options
| Flag | Description | Example |
|---|---|---|
-d, --depth |
Recursion depth (0 = current dir only) | sized -d 1 |
-m, --min-size |
Filter by minimum size | sized -m 100MB |
--sort |
Sort columns (name, type, size, blocks) | sized --sort size:asc |
--units |
Unit system (binary, decimal) | sized --units decimal |
--precision |
Decimal places for sizes | sized --precision 3 |
-f, --path-full |
Force absolute paths in headers | sized -f |
-i, --ignore |
Respect .gitignore files | sized -i |
-j, --threads |
Set number of threads | sized -j 4 |
--format |
Output format (text, csv, json) | sized --format json |
--save |
Save output to file | sized --save |
Examples
Find large directories (depth 1), respecting gitignore, and save to CSV:
sized . -d 1 -i -m 50MB --format csv --save
Generate Shell Completions
Bash:
Add the following to your .bashrc or .bash_profile:
# Option 1: Source directly
source <(sized --completions bash)
# Option 2: Save to file (safer startup time)
sized --completions bash > ~/.sized_completions.bash
echo "source ~/.sized_completions.bash" >> ~/.bashrc
Zsh:
# In your .zshrc
sized --completions zsh > /usr/local/share/zsh/site-functions/_sized
# OR
sized --completions zsh > ~/.zfunc/_sized
fpath+=~/.zfunc
autoload -Uz compinit && compinit
Fish:
sized --completions fish > ~/.config/fish/completions/sized.fish
License
Description
A fast, concurrent, and feature-rich command-line tool for visualizing disk usage, written in Rust.
https://gitea.speelman.ca/gamertan/sized
216 KiB
Releases
1
Languages
Rust
85.4%
Roff
6.7%
Shell
4.6%
Ruby
1.8%
Makefile
1.5%