You are probably familiar with tail -f to watch updates to a text file, and you are probably also familiar with the frustration of seeing something interesting whizz by then having to open the file in vim (or whatever you use) to find it and see what was going on. Well, maybe you should try less +F, a less well known alternative to tailing a file which lets you stop and poke around at will, then exit or continue watching for updates. Its really quite amazing. This is how it works:

less +F logs/development.log

  • watch logs go by at a dizzying pace
  • see something interesting

ctrl+c

  • poke around using arrow keys or vim keybindings

F (shift+f)

  • watch logs go by at a dizzying pace

So basically you are interrupting the live-update with ctrl+c which puts you into the normal viewing mode which you are used to, then continuing with F. To exit completely you need to be in normal mode then hit q just like before.