当前位置:首页 > 操作系统 > Linux

linux--日志文件过大?查看日志文件某个时间段的内容

某个时间段的日志输出到新文件

sed  -n '/2020-06-17 17:00:00/,/2020-06-17 18:50:59/p'  nohup.out >> 061717.log 

 

查看文件大小

ll -lh 061717.log 

 

将最近200行文件输出到新文件

sudo tail -200 nohup.out > test1.log

 


【说明】本文章由站长整理发布,文章内容不代表本站观点,如文中有侵权行为,请与本站客服联系(QQ:254677821)!

相关教程推荐

其他课程推荐