Skip to content

Instantly share code, notes, and snippets.

@faceleg
Created May 13, 2013 22:21
Show Gist options
  • Save faceleg/5571996 to your computer and use it in GitHub Desktop.
Save faceleg/5571996 to your computer and use it in GitHub Desktop.
Find largest files or directories in the current directory. Warning: this command can render the machine unresponsive while processing.
for X in $(du -s * | sort -nr | cut -f 2); do du -hs $X ; done | head -n 20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment