文件相关读

1 实时观察文件新增内容

tail -f proc_module.log 

2 查看最后100行文件内容

 tail -n 100 proc_module.log 

3 查看文件中所有带关键字的内容的前后5行

cat  proc_module.log | grep "key_print" -C 5

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章