Comments on How To Reduce Log File Disk Usage With ISPConfig Or LAMP
How To Reduce Log File Disk Usage With ISPConfig Or LAMP Slowly I was seeing my disk usage increasing, I knew it was log files that were getting bigger and bigger. I found out that Apache log files were the worst, there was around 1GB of space used in 3 months.
5 Comment(s)
Comments
How is this a step above or beyond configuring logrotate correctly? Logrotate is part of almost any default install and you can easily fine grain what gets rotated and when with the conf file in etc.
nice script - but there is already in existence a very nice log rotating utility which should be obtainable on most any unix os - 'logwatch' - here's a nice article about it:
http://www.debian-administration.org/articles/117
On an ISPConfig Ubuntu Hardy system "Perfect server setup" :
sh /root/logclean.sh
/root/logclean.sh: line 9: cd: /var/www/webalizer/log: No such file or directory
any clue ?
Hi, just add &>/dev/null in front of cd, tar and rm command such as :
cd test &>/dev/null
Marc
Hi!
It's good but with one problem:
line 3: 'date +%m'-1: syntax error: operand expected (error token is "'date +%m'-1")