tail -n 10 file.log 查询日志尾部最后10行的日志;
tail -n +10 file.log 查询第10行之后的所有日志;
tail -fn 100 file.log 循环实时查看最后100行记录
tail一般还会配合着grep用
tail -fn 1000 file.log | grep '关键字'
如果查询的数据量太大,Ctrl + F 或者 空格键可以翻页查看
tail -n 5000 file.log |more -1000
参考链接
微信扫一扫
tail -n 10 file.log 查询日志尾部最后10行的日志;
tail -n +10 file.log 查询第10行之后的所有日志;
tail -fn 100 file.log 循环实时查看最后100行记录
tail一般还会配合着grep用
tail -fn 1000 file.log | grep '关键字'
如果查询的数据量太大,Ctrl + F 或者 空格键可以翻页查看
tail -n 5000 file.log |more -1000
参考链接
相关推荐