Created
May 27, 2014 13:43
-
-
Save mcescalante/01d5327d13d8af2a79bf to your computer and use it in GitHub Desktop.
Find large things with Linux
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ncdu is another utility that might be useful (and it's interactive) | |
#Find 10 largest files | |
find . -type f -print0 | xargs -0 du | sort -n | tail -10 | cut -f2 | xargs -I{} du -sh {} | |
#Find 10 largest directories (change f to d) | |
find . -type d -print0 | xargs -0 du | sort -n | tail -10 | cut -f2 | xargs -I{} du -sh {} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment