Skip to content

Instantly share code, notes, and snippets.

@iamjjanga-ouo
Last active July 3, 2022 00:14
Show Gist options
  • Save iamjjanga-ouo/d081d29fa76935fa2e486ea2250f9db4 to your computer and use it in GitHub Desktop.
Save iamjjanga-ouo/d081d29fa76935fa2e486ea2250f9db4 to your computer and use it in GitHub Desktop.
linux `du` command examples #linux

du examples


find all files(include hidden) size in cwd

$ du -sch .[!.]* * |sort -h
# =======OUTPUT
0	target
4.0K	.bashrc
4.0K	.mysql_history
4.0K	.node_repl_history
4.0K	.profile
4.0K	.python_history
4.0K	.selected_editor
4.0K	.wget-hsts
4.0K	result
8.0K	.gnupg
8.0K	.vim
12K	.config
12K	.ssh
20K	snap
32K	.viminfo
52K	.bash_history
12M	.cache
78M	.npm
90M	total

Alternatively, ncdu

$ sudo apt-get install ncdu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment