count-files

Crates.iocount-files
lib.rscount-files
version0.2.0
sourcesrc
created_at2022-04-16 08:54:15.429571
updated_at2022-04-23 12:47:56.229098
descriptionCount files by extension.
homepagehttps://github.com/yinguobing/count-files
repositoryhttps://github.com/yinguobing/count-files
max_upload_size
id568889
size22,125
Yin Guobing (yinguobing)

documentation

https://github.com/yinguobing/count-files

README

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.

Commit count: 34

cargo fmt