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

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

 

相关文章: