-f, --follow[={name|descriptor}]
output appended data as the file grows;
It scans the file as it grows. And this is an interval process. You can only interrupt it.
Use parameter:
-c,
output the last K bytes; alternatively, use -c +K to output bytes starting with the Kth of each file
or
-n,
output the last K lines, instead of the last 10; or use -n +K to output lines starting with the Kth
EDIT: as bmk said:
grep --line-buffered
think it helps you
source
share