You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
794 B

5 years ago
# **logrotate**
7 years ago
6 years ago
## 说明
7 years ago
5 years ago
**logrotate命令** 用于对系统日志进行轮转、压缩和删除也可以将日志发送到指定邮箱。使用logrotate指令可让你轻松管理系统所产生的
记录文件。每个记录文件都可被设置成每日,每周或每月处理,也能在文件太大时立即处理。您必须自行编辑,指定配置文件,预设的配置文件存放在
`/etc/logrotate.conf`文件中
7 years ago
5 years ago
## 选项
7 years ago
5 years ago
```markdown
-d, --debug Don't do anything, just test (implies -v)
-f, --force 强制文件rotate
-m, --mail=command Command to send mail (instead of `/bin/mail')
-s, --state=statefile Path of state file
-v, --verbose Display messages during rotation
-l, --log=STRING Log file
7 years ago
```