下面的块没有压缩语句-
/a/b/file.log{
size 200M
create 0664 root root
rotate 10
datext
dateformat -%Y-%m-%d-%s
}这个有个压缩语句-
/a/b/file.log{
size 200M
create 0664 root root
rotate 10
compress
datext
dateformat -%Y-%m-%d-%s
}这个有一个nocompress语句-
/a/b/file.log{
size 200M
create 0664 root root
rotate 10
nocompress
datext
dateformat -%Y-%m-%d-%s
}上述三种方案的区别是什么?日志轮转的功能在它们中有什么不同呢?
发布于 2022-01-05 09:45:19
其他人已经说过了。
您必须检查默认值。这不仅是对logrotate的修正,也是对其他人的建议。
logrotate的手册描述如下:
默认情况下,
compress旧版本的日志文件是用gzip(1)压缩的。另见nocompress。nocompress旧版本的日志文件没有压缩。另见compress。
https://unix.stackexchange.com/questions/685105
复制相似问题