How To Filter Tail Or Any Other Stream With Grep
source link: https://rafaelnexus.com/tips/how-to-filter-tail-or-any-other-stream-with-grep/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
How To Filter Tail Or Any Other Stream With Grep
at Sun Feb 3, 2019 in
Tail & Grep
The debugging process can be extenuating, usually involves you fiddling around dozens of log files, tracking down some processes, etc…
And for that, any help is welcomed, with this simple trick you can filter the output of the tail command in real time using grep.
This can be particularly useful when you are tracking down some specific action that is being buried by tons of information.
You just need to pipe your tail command with grep using the parameter –line-buffered, like this example here:
tail -f filename.log | grep --line-buffered pattern
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK