httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "RuneImp" <>
Subject Re: Cleaning log files
Date Wed, 13 Mar 2002 09:36:16 GMT
I use a croned shell script after all logs have been
processed by PerlFect DailyStats.

All logs are place within this type of directory


This is the script:

for file in /usr/home/*/web/logs/*.log; do
        echo Trimming $file
        tail -5000 $file > temp
        mv temp $file
/usr/local/sbin/apachectl graceful

Is this a bad practice?

-=- RuneImp
ImpTech - Web Design, Hosting & Computer Tech

----- Original Message ----- 
From: "Artiom Morozov" <>
To: <>
Sent: Wednesday, March 13, 2002 1:14 AM
Subject: Re: Cleaning log files

depends on how you're transferring logs to files, but in general - it's 
not. use logrotate(8) or rotatelogs from apache distribution.

On 2002.03.13 11:02 Dror Braznitzki wrote:
> Hello,
> Is it safe to clean log files using 'cat /dev/null > log_file' while
> the
> server is running ?
> Is there a better way of doing it ?
> Thanx,

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message