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

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

# **logrotate**
## 说明
**logrotate命令** 用于对系统日志进行轮转、压缩和删除也可以将日志发送到指定邮箱。使用logrotate指令可让你轻松管理系统所产生的
记录文件。每个记录文件都可被设置成每日,每周或每月处理,也能在文件太大时立即处理。您必须自行编辑,指定配置文件,预设的配置文件存放在
`/etc/logrotate.conf`文件中
## 选项
```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
```