how to automatically scroll to bottom

768 views
Skip to first unread message

kris....@gmail.com

unread,
Jul 12, 2015, 3:53:40 AM7/12/15
to ln...@googlegroups.com
Hi,

How do I make lnav scroll to the bottom on start just like tail -f does?

My usual workflow is to run "lnav ./log-path/filename.log" and then press G to quickly go to the bottom. I'm starting to feel this is unnecessary and I'm wondering if there's a setting somewhere to enable this behaviour by default but I can't find it in the guides.

Regards,
Kris

Timothy Stack

unread,
Jul 12, 2015, 1:20:16 PM7/12/15
to Kris Khaira, ln...@googlegroups.com
On Sun, Jul 12, 2015 at 12:53 AM, <kris....@gmail.com> wrote:
Hi,

How do I make lnav scroll to the bottom on start just like tail -f does?

​When first opening a log file, it should scroll to the bottom.  But, after it's
been opened, the current location in the file is recorded so that when you
open it again, it will return to the same spot.  I find this behavior the most
useful.

My usual workflow is to run "lnav ./log-path/filename.log" and then press G to quickly go to the bottom. I'm starting to feel this is unnecessary and I'm wondering if there's a setting somewhere to enable this behaviour by default but I can't find it in the guides.

​I don't think there is​ at the moment, the most you can do is to call ':goto'
from the command line.  For example, to go to the last five lines of the
file, you can do:

  $ lnav -c ':goto -5'

​Putting​ that in an alias might get you close to what you want.

Regards,
Kris

​tim
 
Reply all
Reply to author
Forward
0 new messages