5
A
回答
11
是 - 您使用管道。即
tail -f <some filename> | grep 'username'
4
0
事實上,我發現它使用效率更高: grep username filename | tail
3
ack
命令是一個類似grep的文本查找程序,它有一個專門爲此設計的--passthru
標誌。
由於ack
自動顏色代碼爲你匹配,你可以用它來搜索一個尾日誌文件的輸出,並突出了比賽,但也看到不匹配的行。
tail -f error.log | ack --passthru whatever
拖尾日誌的所有行都會顯示出來,但匹配項會突出顯示。
相關問題
- 1. weakValues()和expireAfterAccess()可以結合使用嗎?
- 2. Tail -f + grep?
- 3. 我可以將這個Perl結合到一個map-grep鏈嗎?
- 4. 'grep -q'不能以'tail -f'退出
- 5. 我可以結合KineticJS和jQuery嗎?
- 6. 可以結合kinetic.js和backbone.js嗎?
- 7. Paramiko/ssh/tail + grep掛起
- 8. 有什麼辦法可以結合使用CreateView和UpdateView嗎?
- 9. 時間線和網絡模型可以結合使用嗎?
- 10. 我可以使用select來結合stdin和accept嗎?
- 11. 事件和數據觸發器可以結合使用嗎?
- 12. 春季我可以結合使用@controller和XML bean映射嗎?
- 13. grep可以用UTF-8輸出結果嗎?
- 14. 您可以使用量角器與PageFactory結合使用嗎?
- 15. 可靠集合可以在服務結構之外使用嗎?
- 16. 結合grep sed,而
- 17. 你可以結合CSS聲明嗎?
- 18. 我可以結合jQuery選擇器嗎?
- 19. Websockets可以與Inter Process Communication結合嗎?
- 20. 我們可以結合git標籤嗎?
- 21. 我可以結合這些事件嗎?
- 22. 你可以將propTypes與defaultProps結合嗎?
- 23. SQL查詢可以結合嗎?
- 24. 我可以結合嘗試catch塊嗎?
- 25. 你可以結合Jersey和Spring(@Provider和@Component)嗎?
- 26. 使用EJB時可以混合使用DI和JNDI查找嗎?
- 27. Python 2.7子流程:tail -f | grep
- 28. tail -F log.log | grep ResponseTime |切-d = -f 2
- 29. cuda可以與activeX技術結合使用嗎?
- 30. 我可以將DirectoryServices與AccountManagement結合使用嗎?
也許'tail [...] -f | grep username' – cnicutar
使用'tailf'而不是'tail -f'更有效率。 – Pointy