Skip to content

Instantly share code, notes, and snippets.

@billsinc
Last active December 4, 2019 15:06
Show Gist options
  • Save billsinc/4665346 to your computer and use it in GitHub Desktop.
Save billsinc/4665346 to your computer and use it in GitHub Desktop.
Find Largest Files/Directories on Linux System
# 10 Largest Files
find . -type f -print0 | xargs -0 du -s | sort -n | tail -10 | cut -f2 | xargs -I{} du -sh {}
# 10 Largest Directories
find . -type d -print0 | xargs -0 du -s | 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