MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/linux/comments/30skg1/stop_using_tail_f_mostly/cpvoele/?context=3
r/linux • u/[deleted] • Mar 30 '15
219 comments sorted by
View all comments
7
My most common use case for tail -f is "tail -f foo.log | grep search_string", which won't work the same with less
That said, this is a pretty neat less trick.
(After reading this, I think I'm going to be using "tail -F foo.log | grep --line-buffered search_string | less" to get all the features!)
[edit] Updated command line due to additional information in response.
5 u/frymaster Mar 30 '15 Don't forget to pass --line-buffered to grep ;) 1 u/RandomDamage Mar 30 '15 Thanks for saving me some troubleshooting time :)
5
Don't forget to pass --line-buffered to grep ;)
1 u/RandomDamage Mar 30 '15 Thanks for saving me some troubleshooting time :)
1
Thanks for saving me some troubleshooting time :)
7
u/RandomDamage Mar 30 '15 edited Mar 30 '15
My most common use case for tail -f is "tail -f foo.log | grep search_string", which won't work the same with less
That said, this is a pretty neat less trick.
(After reading this, I think I'm going to be using "tail -F foo.log | grep --line-buffered search_string | less" to get all the features!)
[edit] Updated command line due to additional information in response.