How can you stop a tail -f
command after seeing a specific string/word?
I'm trying to follow an expanding log and stop the tail
after finding
a specific word. Is there any kill
command for that? I'm just starting with UNIX.
How can you stop a tail -f
command after seeing a specific string/word?
I'm trying to follow an expanding log and stop the tail
after finding
a specific word. Is there any kill
command for that? I'm just starting with UNIX.
you can enable the grep line buffering if you want to tail file with ongoing writing:
tail -f your_file | grep --line-buffered your_pattern
else if the file is static you can grep your file the pattern you are looking for.
tail -f
is a command that you ran from the command line? So then doing a Ctrl C – Kevdog777 Jun 24 '16 at 14:34