Deleting stats for awstats, analog and webalizer across all WHM accounts with SSH

I run and manage several large servers for WebDesires and recently I was doing my usual bi-annually cleanup of clients accounts to lower overall disk usage across the servers and as part of this cleanup I realised that awstats, analog and webalizer were using up allot of space across all the accounts. Now in my case I had already disabled awstats, analog and webalizer several months ago so it was alarming to see that disabling these modules did not clean up all the stats files automatically. This is when I decided to find a solution to clean up and remove any stats, this could be useful especially to those who have disabled awstats, analog or webalizer, but also useful for those who just wish to clean out all the logs to save disk space. All you need to do is SSH into your WHM server and run the following command:

rm -rf /home/*/tmp
Now all those ugly stats files are cleaned from all your cPanel accounts, just like magic!

Facebooktwitterredditpinterestlinkedinmail
Author: Dean WilliamsI'm a Web Developer, Graphics Designer and Gamer, this is my personal site which provides PHP programming advice, hints and tips

Post Tags:
, , , ,
0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments