Last active
July 23, 2020 00:41
-
-
Save carlosascari/41b6f5806e3de5d7df7154282c1204ba to your computer and use it in GitHub Desktop.
Script to find largest files in current directory
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
#!/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