Answers:
我同意您的观点,那只能使您更轻松地访问最新文件。无论如何,实际行为是由logrotate'delaycompress'指令决定的,该指令表示'不要在旋转时压缩文件,而是在下次压缩它'。
历史原因可以在logrotate手册中找到:
Postpone compression of the previous log file to the next rotation
cycle. This has only effect when used in combination with compress.
It can be used when some program can not be told to close its logfile and
thus might continue writing to the previous log file for some time.
是的,这样做是为了使更容易访问更多最新的日志文件。logrotate选项delaycompress
对此进行控制。从logrotate联机帮助页:
延迟压缩
Postpone compression of the previous log file to the next rotation cycle. This only has effect when used in combination with compress. It can be used when some program cannot be told to close its logfile and thus might continue writing to the previous log file for some time.
/etc/logrotate.conf
和下的文件中使用/etc/logrotate.d/*
。