Index: [Article Count Order] [Thread]

Date:  Mon, 26 Nov 2007 07:15:24 -0800 (PST)
From:  Herb Rubin <herbr (at mark) pfinders.com>
Subject:  [coba-e:11242] Re: /var problem again...
To:  coba-e (at mark) bluequartz.org
Message-Id:  <10940658.20431196090124613.JavaMail.root (at mark) z01.pfinders.com>
In-Reply-To:  <FB1A2857-0062-4C25-BCD4-A94C910DFFF9 (at mark) comcast.net>
X-Mail-Count: 11242

Its better to do this:

cat /dev/null > /var/log/filename

This will truncate a file in place.

But the best thing to do is review your log rotation schedule.
Rotate more often if necessary.

Herb

----- Original Message -----
From: "Brian" <brian-list (at mark) comcast.net>
To: coba-e (at mark) bluequartz.org
Sent: Monday, November 26, 2007 5:37:36 AM (GMT-0800) America/Los_Angeles
Subject: [coba-e:11239] Re: /var problem again...





On Nov 26, 2007, at 8:09 AM, TUNC ERESEN Skype: eresen wrote:

> I just cleaned /var/log large log files  but  still /var is  3625.76
> 4030.31, how could I reduce the size of the /var folder
> Any rm line I can enter to remove all log files,
>
> Regards
>
> Tunc Eresen

Careful with that, depending on the program/daemon doing the logging,  
just whacking (deleting) the entire log file can give you lots of  
errors when the file doesn't exist and the program needs to open it;   
you can find yourself recreating a bunch of empty files by hand- not  
a lot of fun.





-- 
Herb Rubin
Pathfinders Software
http://www.pfinders.com