diskusage
一个跨平台的磁盘使用情况显示工具,支持Linux、macOS和Windows系统。提供多种过滤和显示选项,如按文件类型过滤、设置显示深度和单位等。
项目地址:https://github.com/chenquan/diskusage$ diskusage -hA tool for showing disk usage.GitHub: https://github.com/chenquan/diskusageIssues: https://github.com/chenquan/diskusage/issuesUsage: diskusage [flags]Flags: -a, --all display all directories, otherwise only display folders whose usage size is not 0 -c, --color string set color output mode. optional: auto, always, ignore (default "auto") -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") -v, --version version for diskusage
## 👀example1. Only files named Doc or docx are counted: diskusage -t doc,docx
or diskusage -f ".+\.(doc|docx)$"
2. The maximum display unit is GM: diskusage -u G
3. Supports color output to pipeline: diskusage -c always | less -R
or diskusage -c always | more