An interesting annoyance that just plagued a coworker:
If you less
a file that's being appended to, you can hit shift-f to start following the output stream in real time. Then, to stop following the output, you hit ctrl-c, after which you can navigate and search the file as usual.
This does not work when using journalctl
. Say you want to follow your nginx log - you'd run journalctl -u nginx
, and then the usual shift-f to start following the output. However, when you press ctrl-c, less
immediately terminates, rather than exiting the "follow" mode and returning to "navigation" mode as it does when following a file.
Needless to say, this is incredibly annoying. Why is this, and how do I restore the normal functionality?
systemd
passes toless
(seeman journalctl
section Environment)... Same question as here...