[NTLUG:Discuss] More from the Saturday topic of "Less is More..."

Stuart Johnston saj at thecommune.net
Tue Apr 19 20:15:52 CDT 2005


Chris Cox wrote:
> Stuart Johnston wrote:
> 
>> David I S Mandala wrote:
>>
>>> "tail -f | grep something | less" perhaps
>>
>>
>>
>> Actually "tail -f | grep something" works quite well.  I guess I was 
>> trying to do it the other way round, "grep something | tail -f" which 
>> does not work.
> 
> 
> Uh... it's called
> grep something
> 
> What are you trying to do?

The point of the tail -f is that the output continuously updates as the 
file changes.  Say for example that there is a host abusing my mail 
server and I want to watch what it is doing, in real time.  I might do 
something like:

tail -f maillog | grep ipaddress




More information about the Discuss mailing list