转载和积累系列 - Linux 日志轮替
2012-06-20 15:49
471 查看
#日志轮替默认子Cron里面进行 /etc/cron.daily/logrotate #日志文件依赖配置文件 /etc/logrotate.conf #配置文件详细内容解读 weekly #默认每周进行一次日志清理 rotate 10 #保留的日志文件 # create new (empty) log files after rotating old ones create #创建一个新的来存储 # uncomment this if you want your log files compressed #compress #是否需要压缩 # RPM packages drop log rotation information into this directory include /etc/logrotate.d # no packages own wtmp -- we'll rotate them here /var/log/wtmp { #针对单个wtmp日志操作 monthly #每个月一次 minsize 1M #超过1M整理 create 0664 root utmp #新加文件权限和用户组 rotate 1 #保留一个文件 }
相关文章推荐
- 转载和积累系列 - linux 内核参数调整优化网络
- 转载和积累系列 - 合并文件,排序并且去重 linux命令
- 转载和积累系列 - linux 文件系统限制ulimit用法
- 转载和积累系列 - linux init命令
- 转载和积累系列 - Linux常用命令记录
- 转载和积累系列 - Linux 常用工作管理命令
- 转载和积累系列 - Linux下账户管理操作
- 转载和积累系列 - Linux tcpdump命令详解
- 转载和积累系列 - linux 生成KEY的方法与使用
- 转载和积累系列 - linux crontab详细
- 转载和积累系列 - linux时间同步命令
- linux 命令系列之 日志轮替(75)
- 转载和积累系列 - 分析服务器日志常用命令
- 转载和积累系列 - linux 用户命令
- 转载和积累系列 - linux安全设置
- 转载和积累系列 - Linux常用信息显示命令
- 转载和积累系列 - Linux Top命令详解
- 转载和积累系列 - Linux常用网络命令
- 转载和积累系列 - Linux 大规模请求服务器连接数相关设置
- 转载和积累系列 - Linux常用操作命令