Show the file sizes grouped by extension, file type (Image, Video, Document, ...), parent directory or file name.
Example of running fss on the repo (after some builds):
$ fss -g type
1.56 MB Code
4.92 MB Image
16.67 MB Archive
28.25 MB Executable
576.12 MB Other
Total:
627.52 MBThe code for this app was adapted from diskus by sharkdp. Furthermore the size filtering was taken from fd by the same author. He makes some really great programs, go check them out!
git clone https://github.com/Alessandro201/fss.git
cd fss
cargo build -r
./target/release/fss --helpComputes disk-usage for the given entries and groups them by extension or file types
Usage: fss [OPTIONS] [INPUTS]...
Arguments:
[INPUTS]...
List of paths
[default: .]
Options:
-g, --group-by <GROUP_BY>
Select how to group the files sizes. [values: e, t, f, d]
'e': extension
't': file type, eg. Images, Videos, Documents...
'f': file name
'd': parent directory
[default: extension]
-S, --size <SIZE>
Limit results based on the size of files using the format <+-><NUM><UNIT>.
'+': file size must be greater than or equal to this
'-': file size must be less than or equal to this
If neither '+' nor '-' is specified, file size must be exactly equal to this.
'NUM': The numeric size (e.g. 500)
'UNIT': The units for NUM. They are not case-sensitive.
Allowed unit values:
'b': bytes
'k': kilobytes (base ten, 10^3 = 1000 bytes)
'm': megabytes
'g': gigabytes
't': terabytes
'ki': kibibytes (base two, 2^10 = 1024 bytes)
'mi': mebibytes
'gi': gibibytes
'ti': tebibytes
-s, --size-format <SIZE_FORMAT>
Output format for file sizes (decimal: base-10 MB, binary: base 2 MiB, bytes: raw byte count B)
[default: decimal]
[possible values: decimal, binary, bytes]
-b, --apparent-size
Compute apparent size instead of disk usage
-j, --threads <THREADS>
Set the number of threads to use. Default 3 x num cores
[default: 48]
-v, --verbose
Do not hide filesystem errors
-h, --help
Print help (see a summary with '-h')
-V, --version
Print version
The available filetype are:
- Image
- Video
- Document
- Executable
- Archive
- Audio
- Code
- GenomicData
- Other
This is the full list of extension per file type
- jpg
- jpeg
- jpegxl
- png
- tiff
- raw
- nef
- webp
- psd
- heic
- gif
- avif
- dng
- svg
- bmp
- mp4
- mkv
- avi
- webm
- flv
- f4v
- gifv
- mpeg
- mpg
- mov
- wmv
- 3gp
- aaf
- avchd
- txt
- docx
- doc
- xlsx
- xls
- csv
- tsv
- md
- odt
- fodt
- pages
- rtf
- tex
- latex
- epub
- kpub
- ppt
- pptx
- otp
- odp
- pot
- pps
- bib
- log
- tmp
- temp
- py
- pyc
- pyo
- xml
- html
- htm
- htmx
- xhtml
- xht
- css
- js
- jsx
- json
- yaml
- toml
- ts
- c
- cpp
- h
- rs
- r
- go
- zig
- awk
- cs
- csproj
- ici
- ipynb
- kt
- lua
- php
- pl
- pm
- ps1
- sh
- fish
- asm
- d
- vim
- java
- lisp
- php3
- php4
- php5
- phps
- vb
- sql
- exe
- apk
- o
- so
- app
- dll
- elf
- jar
- lib
- mp3
- aiff
- aif
- aifc
- wav
- flac
- wma
- dts
- ac3
- aac
- ots
- ogg
- gz
- gzip
- zst
- zstd
- zip
- 7z
- 7zip
- rar
- tar
- bin
- dat
- bz2
- pak
- par
- pax
- sqlite
- sq
- vbox
- bam
- bai
- sam
- bed
- gtf
- gtf2
- gtf3
- gff
- gff2
- gff3
- bedpe
- cram
- sra
- fastq
- fasta
- fa
- fq
- fasterq
- embl
- genbank
- pdb
- ncbi
- maf
- nwk
- phd
- vcf
- pod5