Command for reloading file from disk to show changes when using “less?”

command linelessunix

In less is there a command for reloading a file from disk, so that less will show any changes made to a file since less was started? This would saving me have to terminate and restart less if I want to see changes to the file I'm viewing.

Best Answer

There are two possibly relevant commands detailed in the fine manual for less(1)

   R      Repaint the screen, discarding any buffered  input.   Useful  if
          the file is changing while it is being viewed.

   F      Scroll  forward, and keep trying to read when the end of file is
          reached.  Normally this command would be used  when  already  at
          the  end of the file.  It is a way to monitor the tail of a file
          which is growing while it is being  viewed.   (The  behavior  is
          similar to the "tail -f" command.)