是否可以组合使用尾部和grep?

Paw*_*wan 5 linux grep pipeline tail

我试图在生产日志中尾随用户.

是否可以使用

tail -f grep "username"
Run Code Online (Sandbox Code Playgroud)

Ed *_*eal 12

是的 - 您使用烟斗.即

tail -f <some filename> | grep 'username'
Run Code Online (Sandbox Code Playgroud)