Simple command to reset / clear all logs?

Adam Vande More amvandemore at gmail.com
Thu Jan 13 07:20:16 UTC 2011


On Wed, Jan 12, 2011 at 1:50 PM, Redd Vinylene <reddvinylene at gmail.com>wrote:

> Will the logs automatically create themselves? I mean, I picture I have to
> manually touch a lotta them in order to avoid "cannot find" error messages?
>

Please don't top post.

do something like this:

shutdown now
rm /var/log/*
exit

upon reentering multiuser mode, each logging service will create it's new
file.  Typically if a service is running and you delete the log from it, the
service will not like it.  You can HUP the service to have it restart
logging, but you'd have to do it manually for each log you deleted.

-- 
Adam Vande More


More information about the freebsd-questions mailing list