Skip to content

Instantly share code, notes, and snippets.

@carlosascari
Last active July 23, 2020 00:41
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 carlosascari/41b6f5806e3de5d7df7154282c1204ba to your computer and use it in GitHub Desktop.
Save carlosascari/41b6f5806e3de5d7df7154282c1204ba to your computer and use it in GitHub Desktop.
Script to find largest files in current directory
#!/bin/bash
# Top 20 Files
find -type f -exec du -Sh {} + | sort -rh | head -n 20
# Top 20 Dirs
du -Sh | sort -rh | head -20
du -a . | sort -n -r | head -n 20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment