feat: v0.2.0 - Performance optimization and distribution pipeline
- 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
This commit is contained in:
@@ -6,22 +6,71 @@ A fast, concurrent, and feature-rich command-line tool for visualizing disk usag
|
||||
|
||||
- **Fast & Concurrent**: Uses `rayon` to process directories in parallel, making it extremely fast on modern multi-core systems.
|
||||
- **Rich Output**: Beautifully formatted tables with colors, distinguishing files and directories.
|
||||
- **Dual Units**: Displays sizes in both Binary (MiB, GiB) and Decimal (MB, GB) units for clarity.
|
||||
- **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, or block count (`--sort`).
|
||||
- **Sorting**: Flexible sorting by name, type, size (apparent), or blocks (usage) (`--sort`).
|
||||
- **Gitignore Support**: Respects `.gitignore` and `.ignore` files 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
|
||||
|
||||
### From Source
|
||||
Ensure you have Rust and Cargo installed. Clone the repository and install:
|
||||
### 🚀 Direct Download (macOS & Linux)
|
||||
Download the latest archive for your architecture from the [Releases](https://gitea.speelman.ca/gamertan/sized/releases) page.
|
||||
|
||||
1. **Extract the archive**:
|
||||
```bash
|
||||
tar -xzf sized-v0.2.0-Darwin-arm64.tar.gz
|
||||
```
|
||||
|
||||
2. **Install Binary & Man Page**:
|
||||
```bash
|
||||
# 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/
|
||||
```
|
||||
|
||||
3. **macOS Security (Gatekeeper)**:
|
||||
Since the binary isn't code-signed for the App Store, macOS may block it. To allow it:
|
||||
```bash
|
||||
sudo xattr -d com.apple.quarantine /usr/local/bin/sized
|
||||
```
|
||||
*Alternatively, run `sized` once, let it fail, then go to **System Settings > Privacy & Security** and click **"Allow Anyway"**.*
|
||||
|
||||
### 🍺 Homebrew (macOS & Linux)
|
||||
If you have a homebrew tap:
|
||||
```bash
|
||||
brew install gamertan/tap/sized
|
||||
```
|
||||
|
||||
### 📦 Debian / Ubuntu (.deb)
|
||||
1. Download the `.deb` package from the [Releases](https://gitea.speelman.ca/gamertan/sized/releases) page.
|
||||
2. Install using `dpkg`:
|
||||
```bash
|
||||
sudo dpkg -i sized_0.2.0_amd64.deb
|
||||
```
|
||||
|
||||
### 🦀 From Source (Rust toolchain required)
|
||||
```bash
|
||||
git clone https://gitea.speelman.ca/gamertan/sized.git
|
||||
cd sized
|
||||
make install # Installs binary and man page
|
||||
```
|
||||
|
||||
Alternatively, via Cargo:
|
||||
```bash
|
||||
cargo install --path .
|
||||
```
|
||||
|
||||
## Documentation
|
||||
- **[Manual](MANUAL.md)**: Detailed explanations of all flags and features.
|
||||
- **[Man Page](sized.1)**: Standard unix man pages (installed via `make install`).
|
||||
|
||||
## Usage
|
||||
|
||||
### Basic Usage
|
||||
@@ -41,7 +90,9 @@ sized /path/to/directory
|
||||
|------|-------------|---------|
|
||||
| `-d`, `--depth` | Recursion depth (0 = current dir only) | `sized -d 1` |
|
||||
| `-m`, `--min-size` | Filter by minimum size | `sized -m 100MB` |
|
||||
| `-s`, `--sort` | Sort columns (size, name, type, blocks) | `sized --sort size:asc` |
|
||||
| `--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` |
|
||||
|
||||
Reference in New Issue
Block a user