I am not sure this can be done, but with linux, you never know it’s limits.
I am tailing an apache log:
\#tail -f apachelog.access-log
It gets me what I want, but I want to narrow down what it returns. Here’s a typical row I’ll get:
2011-01-28T04:20:59-07:00 SERVER03 apache: 10.0.0.1 - - [28/Jan/2011:04:20:59 +0000] "POST /a/ HTTP/1.1" 200 4461 "http://somesite.net/" "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13"
Is it possible to filter what I am tailing?
At times, I’d like to only view the referring site. And other times I’d like to view 2 or 3 other items.
You can quite easily execute:
which will only give you lines containing the string
SERVER03.