码迷,mamicode.com
首页 > 系统相关 > 详细

linux logrotate 日志文件roll up

时间:2015-01-14 21:13:49      阅读:304      评论:0      收藏:0      [点我收藏+]

标签:

log rotate


vi /etc/logrotate.d/spark :

/apps/svr/spark-1.1.1-bin-cdh4/logs/mercury-spark-span.log
{
    notifempty
    daily
    rotate 5
    compress
    olddir /apps/svr/spark-1.1.1-bin-cdh4/logs/
    missingok
    copytruncate
}

execute:
/usr/sbin/logrotate -f /etc/logrotate.d/spark

http://blog.csdn.net/cjwid/article/details/1690101

less command does work:
1. export LESSCHARSET=utf-8
2. export LESS=-Mrf

linux logrotate 日志文件roll up

标签:

原文地址:http://www.cnblogs.com/triones-adam/p/4224802.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!