logrotate linux 系统日志管理
logrotate logrotate简介 logrorare一定程度上可以简化对会生成大量日志文件的系统的管理。logrotate可以实现自动轮替、删除、压缩和mail日志的功能。 执行命令 logrotate [-dv] [-f|--force] [-s|--state statefile] config_file .. 选项 # logrotate --help Usage: logrotate [OPTION...] <configfile> -d, --debug Don't do anything, just test (implies -v) 不做实际处理,仅调试 -f, --force Force file rotation 强制执行,忽视参数要求 -m, --mail=command Command to send mail (instead of `/bin/mail') 发送mail -s, --state=statefile Path of state file 查看状态文件 -v, --verbose Display messages during rotation 轮替一次,并显示轮替过程信息 --version Display version information 显示logrotate版本 Help options: -?, --help Show