Simple command to reset / clear all logs?

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

On Thu, Jan 13, 2011 at 3:38 AM, David Demelier <demelier.david at>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
B-deps: gettext- gmake-3.81_4 libiconv-1.13.1_1 popt-1.16
R-deps: gettext- libiconv-1.13.1_1 popt-1.16
[root at blackdragon /usr/ports]#


More information about the freebsd-questions mailing list