| Crates.io | count-files |
| lib.rs | count-files |
| version | 0.2.1 |
| created_at | 2022-04-16 08:54:15.429571+00 |
| updated_at | 2025-05-12 04:18:25.011944+00 |
| description | Count files by extension. |
| homepage | https://github.com/yinguobing/count-files |
| repository | https://github.com/yinguobing/count-files |
| max_upload_size | |
| id | 568889 |
| size | 26,694 |
A simple command line tool to count files by extension.
Open a terminal and run:
count-files /path/to/target_dir
Output sample:
Done in 7 seconds.
+-----------+---------+------------+
| File type | Count | Total size |
+==================================+
| jpg | 1322497 | 112.48GiB |
|-----------+---------+------------|
| txt | 372302 | 97.68MiB |
|-----------+---------+------------|
| JPG | 147 | 26.04MiB |
|-----------+---------+------------|
| bmp | 130 | 714.12MiB |
|-----------+---------+------------|
| tar | 9 | 114.88GiB |
+-----------+---------+------------+
If you have Rust installed, then use cargo:
cargo install count-files
Or, you can build it manually following the next section, then copy the executable file into the $PATH directory.
# Install for all users on Ubuntu.
sudo cp target/release/count-files /usr/local/bin
count-files is written in Rust, you need to install Rust to compile it.
To build:
git clone https://github.com/yinguobing/count-files.git
cd count-files
cargo build --release
The executable file count-files could be found in target/release directory.