tail -f /var/myfile
But if we are looking for only some specific keywords we can use the following command:
tail -f /var/myfile | fgrep --color -C 4 'keyword'
Here the "--color" means to highlight the found keyword.
And "-C 4" means to print 4 lines above and below the found keyword.
Комментариев нет:
Отправить комментарий