grep cwd /var/log/exim_mainlog | grep -v /var/spool | awk -F"cwd=" '{print $2}' | awk '{print $1}' | sort | uniq -c | sort -n
Category: cPanel
Disk space almost full on cPanel server
I had an issue where my cPanel server was quickly running out of space. All user accounts combined were a fraction of the disk space, so I had to look in the server to see what was causing the disk usage to increase rapidly each day.
To find the issue, SSH’d into the server and ran this:
Find largest files
du -hs * | sort -rh | head -5
Once the files are found, remove them:
rm <filename>
or clear them, instead of deleting:
cat /dev/null > {FILENAME}
The culprit for me was “messages-” log files in /var/log.