Explanation: The /etc/newsyslog.conf file is the configuration file for the newsyslog command, which is used to rotate log files on BSD systems. The newsyslog command is typically run by cron at regular intervals to check if any log files need to be rotated based on the criteria specified in the /etc/newsyslog.conf file. The file contains a series of entries, one per line, that define the log file name, the owner and group, the mode, the count, the size, the when, the flags, and the pidfile for each log file. For example, the following entry in the /etc/newsyslog.conf file:
/var/log/messages root:wheel 644 7 * @T00 Z /var/run/syslog.pid
means that the /var/log/messages file is owned by root and belongs to the wheel group, has the mode 644, is rotated 7 times, has no size limit, is rotated at midnight every day, is compressed after rotation, and the process ID of syslogd is read from /var/run/syslog.pid and sent a signal to reopen the log file.
The other options are either invalid files or belong to other purposes. For example, /etc/logs.conf is not a valid file, /etc/rc.logd is a startup script for the log daemon, /etc/rc.d/syslogd is a startup script for the syslog daemon, and /etc/syslog.conf is the configuration file for the syslog daemon.
References:
- [newsyslog.conf] - FreeBSD newsyslog.conf(5) Manual Page
- [newsyslog] - FreeBSD newsyslog(8) Manual Page
- [Log File Rotation] - FreeBSD Handbook