使用以下内容搜索传递的日志文件:
cat /path/to/logfile | grep -iEw 'some-ip-address-here|correspondig-mac-adress-here'
这给了我到目前为止所有通过的日志行,所以我可以看到已经发生了什么。现在,我也想看看发生了什么事情,所以我需要换cat
用tail -f
给我这个:
tail -f /path/to/logfile | grep -iEw 'some-ip-address-here|correspondig-mac-adress-here'