This is a pretty unassuming project. I had to calculate some folder sizes at work, there were many folders, I wanted to practice Rust, I had time, I wrote this.
It uses walk_dir to traverse the folder you give to it and prints back the total number of files and also the number of files for each of the immediate subfolders present in the parent folder.
Pretty straightforward:
$ folder_stats "/path/to/folder"
Either absolute or relative paths will work.
2 possibilities:
- Download or clone this repo and run
cargo build
. You'll then need to add the binary to your path or execute it specifying the full path. - Download or clone this repo,
cd
into the folder and runcargo install --path .
. The upside here is you don't need to modify anything in your $PATH, assuming you have the folder where cargo installs binaries inside it, which should be the case. If not, maybe do so now?