Crates.io | count-files |
lib.rs | count-files |
version | 0.2.0 |
source | src |
created_at | 2022-04-16 08:54:15.429571 |
updated_at | 2022-04-23 12:47:56.229098 |
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 | 22,125 |
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.