Simple command to reset / clear all logs?

Chris Brennan xaero at xaerolimit.net
Thu Jan 13 16:41:06 UTC 2011


On Thu, Jan 13, 2011 at 3:38 AM, David Demelier <demelier.david at gmail.com>wrote:

> But, there is sometime subdirectories in /var/log, it doesn't matter? And
> truncate can write on archived files ? such as :
>
> markand at Melon ~ $ ls /var/log/messages*.bz2
> /var/log/messages.0.bz2 /var/log/messages.1.bz2
>

logrotate is your friend.


[root at blackdragon /usr/ports]# make search name=logrotate
Port:   logrotate-3.7.9
Path:   /usr/ports/sysutils/logrotate
Info:   Daemon to rotate, compress, remove and mail system log files
Maint:  js at iksz.hu
B-deps: gettext-0.18.1.1 gmake-3.81_4 libiconv-1.13.1_1 popt-1.16
R-deps: gettext-0.18.1.1 libiconv-1.13.1_1 popt-1.16
WWW:
[root at blackdragon /usr/ports]#

hth/c-


More information about the freebsd-questions mailing list