passing -t to newsyslog

Ian Smith smithi at
Wed Feb 22 13:18:35 UTC 2017

In freebsd-questions Digest, Vol 664, Issue 3, Message: 9
On Tue, 21 Feb 2017 21:19:40 -0600 Adam Vande More <amvandemore at> wrote:
 > On Tue, Feb 21, 2017 at 8:36 PM, Chris Stankevitz <chris at> wrote:
 > > I want "-t" to be passed when newsyslog is run hourly... not when it is
 > > run once when the system boots for the purpose of creating log files.
 > >
 > > Per "man rc.conf":
 > >
 > > newsyslog_enable is used to run newsyslog one time at boot to create
 > > missing log files.  newsyslog_enable does not cause newsyslog to
 > > continuously run.
 > >
 > > Per /etc/crontab:
 > >
 > > newsyslog is run periodically via en entry in /etc/crontab.  newsyslog is
 > > called without any arguments.

 > There is no law preventing you from editing /etc/crontab.  I imagine that
 > bit of advice is there so the system's crontab isn't broken.
 > Setting correct locale may also fulfill your desires assuming LC_TIME is
 > read.

While Matthew well advises using user crontabs where appropriate, this 
is one case where it's likely best to edit /etc/crontab directly.

I've never had qualms about editing /etc/crontab, and do so often, but 
to address concerns about source or binary upgrades, sufficient backup 
becomes something like # cp -p /etc/crontab /root/crontab.mine

cheers, Ian

More information about the freebsd-questions mailing list