| Crates.io | count_exts |
| lib.rs | count_exts |
| version | 0.1.2 |
| created_at | 2025-02-20 16:44:29.936272+00 |
| updated_at | 2025-02-20 16:44:29.936272+00 |
| description | A command-line utility that counts file extensions from stdin input, providing sorted statistics of file types in a directory |
| homepage | https://github.com/rakki194/count_exts |
| repository | https://github.com/rakki194/count_exts |
| max_upload_size | |
| id | 1562792 |
| size | 17,702 |
A fast and efficient command-line utility that counts file extensions from stdin input, providing sorted statistics of file types in a directory.
Make sure you have Rust installed (rustup), then:
git clone https://github.com/rakki194/count_exts
cd count_exts
cargo install --path .
The utility reads file paths from stdin and outputs extension statistics. You can pipe the output of commands like find or ls into it:
# Count extensions in current directory
find . -type f | count_exts
# Count extensions in specific directory
find /path/to/directory -type f | count_exts
# Using with ls
ls -1 /path/to/directory | count_exts
.txt: 42
.rs: 15
.toml: 3
[no extension]: 2
.md: 1
.txt)[no extension]extension: countanyhow (v1.0.96) - Error handlingtokio (v1.43.0) - Async runtime supportcargo test
The test suite includes various scenarios:
cargo build --release
This project is licensed under the MIT License - see the LICENSE file for details.
Contributions are welcome! Please feel free to submit a Pull Request.