passing -t to newsyslog

Polytropon freebsd at
Wed Feb 22 02:30:30 UTC 2017

On Tue, 21 Feb 2017 18:21:13 -0800, Chris Stankevitz wrote:
> Hi,
> I want to pass -t to newsyslog so that archived log files have a useful 
> date/time suffix vs an obnoxious numeric suffix.
> Apparently freebsd uses /etc/crontab to launch newsyslog.  The manual 
> tells me to not edit /etc/crontab [1]
> How should I get my freebsd system to append date/time to archived 
> logfile names?

Configure newsyslog command line flags as intended by addind an
entry to /etc/rc.conf, for example:

	newsyslog_flags="-t <format>"

See /etc/defaults/rc.conf for newsyslog-related examples. Maybe
you also want to add the options -C and -N (which are the default
if you don't specify anything) because /etc/rc.conf will override
(instead of append to) the settings in /etc/defaults/rc.conf.
See "man rc.conf" and "man newsyslog" for details. There is
also /etc/newsyslog.conf for settings you might want to tweak.

Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...

More information about the freebsd-questions mailing list