diskusage
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.
Usage:
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")
👀
example
- Only files named Doc or docx are counted:
diskusage -t doc,docx
ordiskusage -f ".+\.(doc|docx)$"
- The maximum display unit is GM:
diskusage -u G
- Supports color output to pipeline:
diskusage -c always | less -R
ordiskusage -c always | more
If you like or are using this project to learn or start your solution, please give it a star
chore(deps): bump github.com/jedib0t/go-pretty/v6 from 6.4.2 to 6.4.3
Bumps github.com/jedib0t/go-pretty/v6 from 6.4.2 to 6.4.3.
Release notes
Sourced from github.com/jedib0t/go-pretty/v6's releases.
Commits
7d190d0
progress: refactor AppendTracker for readability (#247)72834de
progress: fix overall tracker disappears in corner case (#246)43456ae
Create SECURITY.md (#243)9b55b26
table: refactor render helper function to separate file (#242)398d30f
table: re-organize some tests, reduce cognitive complexity (#241)Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebase
will rebase this PR@dependabot recreate
will recreate this PR, overwriting any edits that have been made to it@dependabot merge
will merge this PR after your CI passes on it@dependabot squash and merge
will squash and merge this PR after your CI passes on it@dependabot cancel merge
will cancel a previously requested merge and block automerging@dependabot reopen
will reopen this PR if it is closed@dependabot close
will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot ignore this major version
will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor version
will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependency
will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)chore(deps): bump github.com/jedib0t/go-pretty/v6 from 6.4.0 to 6.4.2
Bumps github.com/jedib0t/go-pretty/v6 from 6.4.0 to 6.4.2.
Release notes
Sourced from github.com/jedib0t/go-pretty/v6's releases.
Commits
711c5ea
table: colorize title borders; fixes #234 (#240)58a875d
table: one more complex auto-merge unit-test (#239)006d8ca
table: adjust columns to use least space when merged; fixes #226 (#238)Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebase
will rebase this PR@dependabot recreate
will recreate this PR, overwriting any edits that have been made to it@dependabot merge
will merge this PR after your CI passes on it@dependabot squash and merge
will squash and merge this PR after your CI passes on it@dependabot cancel merge
will cancel a previously requested merge and block automerging@dependabot reopen
will reopen this PR if it is closed@dependabot close
will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot ignore this major version
will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor version
will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependency
will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)chore(deps): bump github.com/spf13/cobra from 1.6.0 to 1.6.1
Bumps github.com/spf13/cobra from 1.6.0 to 1.6.1.
Release notes
Sourced from github.com/spf13/cobra's releases.
Commits
b43be99
Check for group presence after full initialization (#1839) (#1841)Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebase
will rebase this PR@dependabot recreate
will recreate this PR, overwriting any edits that have been made to it@dependabot merge
will merge this PR after your CI passes on it@dependabot squash and merge
will squash and merge this PR after your CI passes on it@dependabot cancel merge
will cancel a previously requested merge and block automerging@dependabot reopen
will reopen this PR if it is closed@dependabot close
will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot ignore this major version
will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor version
will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependency
will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)chore(deps): bump github.com/spf13/cobra from 1.5.0 to 1.6.0
Bumps github.com/spf13/cobra from 1.5.0 to 1.6.0.
Release notes
Sourced from github.com/spf13/cobra's releases.
... (truncated)
Commits
8607918
feat: make InitDefaultCompletionCmd public (#1467)2169adb
Add groups for commands in help (#1003)212ea40
Include --help and --version flag in completion (#1813)d4040ad
Allow user to add completion for powershell alias (#1621)23fc5e0
ci: add minimum GitHub token permissions for workflows (#1792)93d1913
Add OnFinalize method (#1788)07034fe
build(deps): bump actions/stale from 5 to 6 (#1815)3dc9761
Add allero to list of projects using cobra (#1819)7039e1f
Add '--version' flag to Help output (#1707)fce8d8a
Expose ValidateRequiredFlags and ValidateFlagGroups (#1760)Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebase
will rebase this PR@dependabot recreate
will recreate this PR, overwriting any edits that have been made to it@dependabot merge
will merge this PR after your CI passes on it@dependabot squash and merge
will squash and merge this PR after your CI passes on it@dependabot cancel merge
will cancel a previously requested merge and block automerging@dependabot reopen
will reopen this PR if it is closed@dependabot close
will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot ignore this major version
will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor version
will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependency
will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)chore(deps): bump github.com/jedib0t/go-pretty/v6 from 6.3.9 to 6.4.0
Bumps github.com/jedib0t/go-pretty/v6 from 6.3.9 to 6.4.0.
Release notes
Sourced from github.com/jedib0t/go-pretty/v6's releases.
Commits
e88b800
progress: support pinned messages with multiple lines (#233)7d299c2
progress: "pin"->"pinned"; sort interfaces/structs (#232)99ac11f
progress: pinned message support (#231)Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebase
will rebase this PR@dependabot recreate
will recreate this PR, overwriting any edits that have been made to it@dependabot merge
will merge this PR after your CI passes on it@dependabot squash and merge
will squash and merge this PR after your CI passes on it@dependabot cancel merge
will cancel a previously requested merge and block automerging@dependabot reopen
will reopen this PR if it is closed@dependabot close
will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot ignore this major version
will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor version
will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependency
will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)chore(deps): bump github.com/jedib0t/go-pretty/v6 from 6.3.8 to 6.3.9
Bumps github.com/jedib0t/go-pretty/v6 from 6.3.8 to 6.3.9.
Release notes
Sourced from github.com/jedib0t/go-pretty/v6's releases.
Commits
d28aad5
table: option to force text direction for tables with BiDi content (#230)Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebase
will rebase this PR@dependabot recreate
will recreate this PR, overwriting any edits that have been made to it@dependabot merge
will merge this PR after your CI passes on it@dependabot squash and merge
will squash and merge this PR after your CI passes on it@dependabot cancel merge
will cancel a previously requested merge and block automerging@dependabot reopen
will reopen this PR if it is closed@dependabot close
will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot ignore this major version
will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor version
will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependency
will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)chore(deps): bump github.com/jedib0t/go-pretty/v6 from 6.3.7 to 6.3.8
Bumps github.com/jedib0t/go-pretty/v6 from 6.3.7 to 6.3.8.
Release notes
Sourced from github.com/jedib0t/go-pretty/v6's releases.
Commits
fb89930
progress: more options for speed, and backward-compatible defaults (#225)ab70b68
progress: option to display progress speed (#224)Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebase
will rebase this PR@dependabot recreate
will recreate this PR, overwriting any edits that have been made to it@dependabot merge
will merge this PR after your CI passes on it@dependabot squash and merge
will squash and merge this PR after your CI passes on it@dependabot cancel merge
will cancel a previously requested merge and block automerging@dependabot reopen
will reopen this PR if it is closed@dependabot close
will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot ignore this major version
will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor version
will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependency
will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)chore(deps): bump github.com/jedib0t/go-pretty/v6 from 6.3.6 to 6.3.7
Bumps github.com/jedib0t/go-pretty/v6 from 6.3.6 to 6.3.7.
Release notes
Sourced from github.com/jedib0t/go-pretty/v6's releases.
Commits
782119a
provide way to override east-asian rune width calc (addr. #220) (#223)b3bddf1
table: do not colorize border using row-painter (fixes #221) (#222)7966e63
fix upgrade instructions in README.md (#219)Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebase
will rebase this PR@dependabot recreate
will recreate this PR, overwriting any edits that have been made to it@dependabot merge
will merge this PR after your CI passes on it@dependabot squash and merge
will squash and merge this PR after your CI passes on it@dependabot cancel merge
will cancel a previously requested merge and block automerging@dependabot reopen
will reopen this PR if it is closed@dependabot close
will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot ignore this major version
will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor version
will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependency
will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)Error: too many open files
Got error:
Error: open /xxx/xxx/xxx.git/info: too many open files
and exit.After I use
diskusage -w 100
It became OK.For the default worker number maybe too many, normal linux open files limit is 1024, so I suggest to reduce the default value to 512.
Unable to run in different directories
I've downloaded the tar, unpacked and moved the executable (Rocky Linux 8.6) into my ~/bin folder. When I run it anywhere, nothing happens (diskusage -h works) unless I go to ~/bin folder and run it there.
If I want to check diskusage of
/my/interesting/path
, I would need to copy this file into that path and then run it there.