某个时间段的日志输出到新文件
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
某个时间段的日志输出到新文件
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
本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。