I use tail -f
in my Linux shell, to view log files, as I like how it auto-updates with the incoming text: I like to see the new stuff come scrolling in.
However, I also like the search functionality of less
, which isn't available in tail
(or is it?). Is there a "best of both worlds" solution?
If there was a mode I could switch on in less
which would make it auto-update with incoming text, then that might be ideal.
Best Answer
You can run
less +F filename
in order to view file intail -f
fashion.You can press Shift+F while viewing file in less to switch to forwarding mode, and Ctrl+C to leave this mode.