Linux 常用命令(遇见了,就记录了 ,随缘吧)

1.实时查看最后日志(默认10条)

   # tail -f xxxxxx.log 

2.查看结尾多少条日志

  # tail -n30 -f xxxx.log

3.根据关键字查询日志

  # cat xxxxx.log | grep '关键字'  或者  # grep '关键字'  xxxx.log

猜你喜欢

转载自www.cnblogs.com/xiaokangk/p/12625450.html