Is it possible to use tail and grep in combination?

Pawan picture Pawan · Jan 2, 2013 · Viewed 23.4k times · Source

I am trying to tail a user in production log.

Is it possible to use

tail -f grep "username"

Answer

Ed Heal picture Ed Heal · Jan 2, 2013

Yes - You use pipe. i.e.

tail -f <some filename> | grep 'username'