てきとうなメモ

本の感想とか技術メモとか

less/lvでtail -f

頻繁に更新されるログファイルを見るときに、tail -f /path/to/logとかやるけどless/lvでできないかなと思っていたらFでtail -fのモードになるのか

       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.)

Fを押すと

Waiting for data, break (^C) to return...

と表示されるので、Ctrl-Cでtail -fモードを終了することができる。

あと、ちょっと更新されたか確認したいというだけならばRでも良いか

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