Flush 'tail -f' buffer?
tail -f
flushes after every input line. You can confirm this with strace
(or truss
or whatever your unix variant provides to trace processes' system calls).
If there is an incomplete line, tail -f
keeps waiting for the next newline. It's a tool designed for text files. If you need to tail a binary file (e.g. if -- Dump completed
is not followed by a newline), you'll have to use a custom tool.
If you've redirected sed
's output away from the terminal, it will be doing its own buffering. Try stdbuf
or unbuffer
.
Example using stdbuf -o0
. Reference: https://superuser.com/a/1123674/126847
tail -F cpu.log | stdbuf -o0 tr '=' ' ' | stdbuf -o0 awk '$6 > 1'