Linux查找日志技巧

先必须了解两个最基本的命令: tail  -n  10  test.log   查询日志尾部最后10行的日志; tail -n +10 test.log    查询10行之后的所有日志; head -n 10  test.log   查询日志文件中的头10行日志; head -n -10  test.log   查询日志文件除了最后10行的其他所有日志; 场景1: 按行号查看---过滤出关键字附近
相关文章
相关标签/搜索