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)

Add comment

Please register in our forum first to comment.

Comments

By:

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.

By:

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

 

 

By:

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 ?

By:

Hi, just add &>/dev/null in front of cd, tar and rm command such as :

cd test &>/dev/null

Marc

 

By:

Hi!

 It's good but with one problem:

 line 3: 'date +%m'-1: syntax error: operand expected (error token is "'date +%m'-1")