This tool will allow you to check folder's extension statistics (in percentage) with various options.
Clone repository using git:
git clone https://github.com/yak6/ext-stats
Change your directory to copied repository:
cd ext-stats
Make the file and install using root priviliges:
sudo make install
From now on the executable will be available at /usr/local/bin/
directory.
Compile source code using Makefile:
make
The output will be available at bin/
directory.
After making a proper instalation, the executable should be available in the /usr/local/bin/
which means you can run it everywhere using dstat
Try using help:
dstat --help
To check file percentage of a directory simply type:
dstat <directory path>
Sort the ouput, ascending or descending.
Arguments: --sort <increasing/decreasing>
, short version: -s <i/d>
Example usage:
dstat exampledirectory/ --sort decreasing
The program will calculate the percentage result in lines or characters, by default in characters.
Arguments: --mode <lines/characters>
, short version: -m <l/c>
Example usage:
dstat exampledirectory/ --mode lines
Range of numbers after the decimal point in the percentage. The range must be a natural number.
Arguments: --range <range>
, short version: r <range>
Example usage:
dstat exampledirectory/ --range 3
Include the amount of characters or lines next to the extension's percentage.
Arguments: --amount
, short version: -a
Include total lines or characters in the output.
Arguments: --total
or -t