3 ms·This. I use: tail -f /var/log/x.log | grep foo -A 20 -B 20 Most of the time.by jfroma 12y agoThis. I use: tail -f /var/log/x.log | grep foo -A 20 -B 20 Most of the time.gitaarik 12y agoYou know you can also do -C 40 for 40 lines of context instead of -A 20 -B 20nkouevda 12y agoNote that -C is in each direction, not total; -C20 is equivalent to -A20 -B20.jfroma 12y agoThank you, This is the reason I always share how I do it in hn! LOL