Skip to content

Instantly share code, notes, and snippets.

@medwig
Last active April 15, 2019 14:47
Show Gist options
  • Save medwig/e57e65c0ed04325e0360349cb0828c3e to your computer and use it in GitHub Desktop.
Save medwig/e57e65c0ed04325e0360349cb0828c3e to your computer and use it in GitHub Desktop.
List files sorted by size - Linux
alias ducks="du -cksh .[^.]* * 2> /dev/null | sort -h -r | head"
@medwig
Copy link
Author

medwig commented Apr 15, 2019

List top 10 files by size - including hidden files, displayed in human readable format (K, M, G)-bytes.

The given du command will throw an error if there is no hidden .files to find, so we can safely hide the error by redirecting stderr to /dev/null.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment