Like du -h
, except more human readable. Because thats the way you wanted du
to print results anyway. Duh.
Prints the human-readable sizes of each item inside a directory, along with a text graphic to show the relative size of each item compared to the total directory size. So that you can quickly and easily find the items taking up the most space.
Console output on non-Windows systems will be colorized based on both absolute size (file or subdir total bytes) and relative size (percent of total dir space usage) to aid in quickly identifying the most significant storage usages amongst directory contents.
For best results, the input argument to duh
should be a directory.
Download a pre-compiled binary from here and run it like this:
$ ./duh .
85K .git |
55B .gitignore |
2K Makefile |
135B README.md |
11.8M build |
569.1M dir1 ||||||||||||||||||||||||||||||
706.2M dir2 ||||||||||||||||||||||||||||||||||||||
432M dir3 |||||||||||||||||||||||
1.9M duh |
156B go.mod |
8.2K go.sum |
137.1M go1.18.3.darwin-amd64.tar.gz |||||||
4.7K main.go |
8.6K main_test.go |
816B notes.md |
-----
1.8G .
Otherwise, build from source using Go version 1.18+:
$ git clone https://github.com/stevekm/duh.git
$ cd duh
$ go build -o ./duh ./main.go