Skip to content

Instantly share code, notes, and snippets.

@schemar
Created May 8, 2015 13:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save schemar/b7399b295bc859d348af to your computer and use it in GitHub Desktop.
Save schemar/b7399b295bc859d348af to your computer and use it in GitHub Desktop.
Find biggest files
cd /
du -hsx * | sort -rh | head -10
# du command -h option : display sizes in human readable format (e.g., 1K, 234M, 2G).
# du command -s option : show only a total for each argument (summary).
# du command -x option : skip directories on different file systems.
# sort command -r option : reverse the result of comparisons.
# sort command -h option : compare human readable numbers. This is GNU sort specific option only.
# head command -10 OR -n 10 option : show the first 10 lines.
#############################################################
# Afterwards you can dig deeper per dir
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment