- 积分
- 5631
在线时间 小时
最后登录1970-1-1
|

楼主 |
发表于 2020-10-22 22:35:50
|
显示全部楼层
日志导出 我们可以查询某个时间段的日志,导出到本地 sed -n '/2019-10-24 22:16:21/,/2019-10-21 20:16:58/p' all.log > yoyo.log [root@VM_0_2_centos logs]# sed -n '/2019-10-24 22:16:21/,/2019-10-21 20:16:58/p' all.log > yoyo.log [root@VM_0_2_centos logs]# ll total 1740 -rw-r--r-- 1 root root 1907 Oct 24 22:54 11.txt -rw-r--r-- 1 root root 1081515 Oct 24 23:04 all.log -rw-r--r-- 1 root root 686962 Oct 24 23:04 script.log -rw-r--r-- 1 root root 3053 Oct 24 23:08 yoyo.log [root@VM_0_2_centos logs]# sed -n '/2020-06-17 17:29:*/,/2020-06-17 17:37:*/p' log-m-all-2020-06-17.php |grep jisujie_1507880222 cat log-m-all-2020-06-17.php|sed -n '/2020-06-17 17:29:*/,/2020-06-17 17:37:*/p'|grep jisujie_1507880222 |
|