Rotatelogs, as far as I know, does not delete logs. It merely rotates
them. If you want to delete for size, you could do some fancy work
with 'ls', cut out the size, compare it to a specific number you want,
and then delete it if it is over that size.
That seems kludgy though. What I do is use find on the directory and
use -ctime +N where 'N' is the number of days you want logs to stick
around. Then you can pipe it through |xargs rm -f. This will delete
any logs that have been around since N days after creation.
--
Thanks,
Ben Ricker
--------------
I use my cat's name for a password: he is called [EMAIL PROTECTED] and I
change his name every 60 days.
On Jun 5, 2008, at 1:01 AM, Agnello George wrote:
HI
I have atleast 20 virtual host on my Apache ( 2.2.8 ) server and am
having a difficulty in deleting the logs after it reaches a certain
limit.
my vhost directive look something like this :
<VirtualHost 192.168.0.244:80>
ServerAdmin [EMAIL PROTECTED]
ServerName agnello.sys.qualiproj.qualispace.com
ServerAlias www.agnello.sys.qualiproj.qualispace.com
DocumentRoot /websites/agnello.com/web
ErrorLog /websites/agnello.com/logs/agnello.sys.qualiproj.error_log
CustomLog /websites/agnello.com/logs/
agnello.sys.qualiproj.access_log combined
TransferLog "|/usr/local/apache2/bin/rotatelogs /websites/
agnello.com/logs/agnello.sys.qualiproj.access_log 5M"
TransferLog "|/usr/local/apache2/bin/rotatelogs /websites/
agnello.com/logs/agnello.sys.qualiproj.error_log 5M"
</VirtualHost>
Is it possible to delete the logs ( with Apache's rotatelog
command ) after the log file reaches a certain size limit.
thanks
--
Regards
Agnello Dsouza
www.linux-vashi.blogspot.com