grep的全称:global search regular and print out the line 雷同与windows环境的ctrl+F
查看日志:cat test.log
-n 展示行数
cat 从头到尾读
head 从头部读
tail 从尾部读
理解以上命令就可以实战查询日志了
grep -n “目标日志” test.log
cat test.log | head -n +100 | head -n 20
grep的全称:global search regular and print out the line 雷同与windows环境的ctrl+F
查看日志:cat test.log
-n 展示行数
cat 从头到尾读
head 从头部读
tail 从尾部读
理解以上命令就可以实战查询日志了
grep -n “目标日志” test.log
cat test.log | head -n +100 | head -n 20