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