Last active
November 9, 2017 14:42
-
-
Save clivewalkden/1004c4b52790d6fcd597ccdc3b03ad96 to your computer and use it in GitHub Desktop.
Track down server disk space hogs
This file contains 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
# Get the size of all the directories in the root sorted by size (MB) | |
du -sm /* | sort -n | |
# To exclude the /home directory (or other partitions not included in the space calculations) use --exclude=/home/ | |
du -sm /* --exclude=/home/ | sort -n | |
# Drill down to the offending directories | |
# These are normally | |
# /var/log | |
# /var/lib/mysql | |
# /usr/local/cpanel |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment