Diskusage
💥A tool for showing disk usage(Linux, MacOS and Windows), it is a very fast utility to find largest directories or files.
Install / Use
/learn @chenquan/DiskusageREADME
diskusage
<a href="https://www.buymeacoffee.com/chenquan"><img src="https://img.buymeacoffee.com/button-api/?text=Buy me a coffee&emoji=&slug=chenquan&button_colour=FFDD00&font_colour=000000&font_family=Poppins&outline_colour=000000&coffee_colour=ffffff" /></a>
English | 简体中文
💥A tool for showing disk usage. (Linux, MacOS and Windows)

😜installation
go install github.com/chenquan/diskusage@latest
or download.
👏how to use
$ diskusage -h
A tool for showing disk usage.
GitHub: https://github.com/chenquan/diskusage
Issues: https://github.com/chenquan/diskusage/issues
Usage:
diskusage [flags]
Examples:
1.The maximum display unit is GB: diskusage -u G
2.Only files named doc or docx are counted:
a.diskusage -t doc,docx
b.diskusage -f ".+\.(doc|docx)$"
3.Supports color output to pipeline:
a.diskusage -c always | less -R
b.diskusage -c always | more
4.Displays a 2-level tree structure: diskusage -d 2
5.Specify the directory /usr: diskusage --dir /usr
6.Export disk usage to file: diskusage > diskusage.txt
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 directory path (default "./")
-D, --directory only display directory
-f, --filter string regular expressions are used to filter files
-h, --help help for diskusage
-l, --limit int limit the number of files and directories displayed (default 9223372036854775807)
-r, --recursion automatically calculate directory depth, for recursively traversing all sub directories
-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
-w, --worker int number of workers searching the directory (default 32)
👀example
- Only files named doc or docx are counted:
diskusage -t doc,docxordiskusage -f ".+\.(doc|docx)$" - The maximum display unit is GB:
diskusage -u G - Supports color output to pipeline:
diskusage -c always | less -Rordiskusage -c always | more
If you like or are using this project to learn or start your solution, please give it a star⭐. Thanks!
Related Skills
node-connect
347.6kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
xurl
347.6kA CLI tool for making authenticated requests to the X (Twitter) API. Use this skill when you need to post tweets, reply, quote, search, read posts, manage followers, send DMs, upload media, or interact with any X API v2 endpoint.
frontend-design
108.4kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
347.6kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
