2 unstable releases
0.2.0 | Apr 23, 2022 |
---|---|
0.1.0 | Apr 16, 2022 |
#74 in #jpeg
8KB
102 lines
count-files
A simple command line tool to count files by extension.
How to use
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 |
+-----------+---------+------------+
Installation
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
Building
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.
Dependencies
~7–16MB
~189K SLoC