diskusage
A tool for showing disk usage.
installation
go install github.com/chenquan/diskusage@latest
how to use
$ diskusage -h
A tool for showing disk usage.
Usage:
diskusage [flags]
Flags:
-a, --all display all directories, otherwise only display folders whose usage size is not 0
-d, --depth int shows the depth of the tree directory structure (default 1)
--dir string dir path (default "./")
-f, --filter string regular expression filter (default ".+")
-h, --help help for diskusage
-t, --type strings only count certain types of files (default all)
-u, --unit string displayed units. optional: B(Bytes), K(KB), M(MB), G(GB), T(TB) (default "M")

example
- Only files named Doc or docx are counted:
diskusage -t doc,docx or diskusage -f ".+\.(doc|docx)$"
- The maximum display unit is G:
diskusage -u G