======================================================= lnav (The Log File Navigator) 0.11.2 keyboard shortcuts ======================================================= First published at 10/23/2023 on https://defkey.com/the-log-file-navigator-0-11-2-shortcuts The Log File Navigator is an advanced log file viewer for the terminal. It can understand your log files and make it easy for you to find problems. lnav (The Log File Navigator) 0.11.2 has 95 shortcuts and we have listed all of them below. Global ------ Ctrl + C If the focused line is from a file connected to an open pipe (the “↻” icon will be next to the file name), a SIGINT will be sent to the child process. Otherwise, lnav will quickly exit. If lnav seems to be stuck in a loop, pressing Ctrl + C three times will trigger an abort exit. Spatial Navigation ------------------ Most of these hotkeys should be available in all views. Space Down a page Page Down Down a page Ctrl + D Down by half a page B Up a page Backspace Up a page Page Up Up a page Ctrl + U Up by half a page J Down a line Down arrow Down a line K Up a line Up arrow Up a line H Left half a page. In the log view, pressing left while at the start of the message text will reveal the shortened source file name for each line. Pressing again will reveal the full path. Left arrow Left half a page. In the log view, pressing left while at the start of the message text will reveal the shortened source file name for each line. Pressing again will reveal the full path. Shift + H Left ten columns Shift + Left arrow Left ten columns L Right half a page Right arrow Right half a page Shift + L Right ten columns Shift + Right arrow Right ten columns Home Top of the view G Top of the view End Top of the view E Next/previous error Shift + E Next/previous error W Next/previous warning Shift + W Next/previous warning N Next/previous search hit Shift + N Next/previous search hit > Next/previous search hit (horizontal) < Next/previous search hit (horizontal) F Next/previous file Shift + F Next/previous file U Next/previous bookmark Shift + U Next/previous bookmark O Forward/backward through log messages with a matching “opid” field Shift + O Forward/backward through log messages with a matching “opid” field S Next/previous slow down in the log message rate Shift + S Next/previous slow down in the log message rate { Previous/next location in history } Previous/next location in history Chronological Navigation ------------------------ These hotkeys are only functional on views that are time-based, like the log view or the histogram view. D Forward/backward 24 hours Shift + D Forward/backward 24 hours 1 (… to 6) Next/previous n’th ten minute of the hour Shift + 1 (… to 6) Next/previous n’th ten minute of the hour 7 Previous/next minute 8 Previous/next minute 0 Next/previous day Shift + 0 Next/previous day R Forward/backward by the relative time that was last used with the go to command Shift + R Forward/backward by the relative time that was last used with the go to command Breadcrumb Navigation --------------------- The following shortcuts are related to the breadcrumb bar that is below the top status bar. ` Focus on the breadcrumb bar Enter If the bar is currently focused, accept the selected value and drop focus Esc Drop focus on the breadcrumb bar Left arrow Select the crumb to the left. If the first crumb is selected, the selection will wrap around to the last crumb Right arrow Accept the current value, which might mean navigating to the value in the view, then selecting the crumb to the right Ctrl + A Select the first crumb Ctrl + E Select the last crumb Down arrow Select the next value in the crumb dropdown Up arrow Select the previous value in the crumb dropdown Home Select the first value in the crumb dropdown End Select the last value in the crumb dropdown While a crumb is selected, you can perform a fuzzy search on the possible values by typing in the value you are interested in Bookmarks --------- M Mark/unmark the top line or focused line when in cursor mode Shift + M Mark/unmark the range of lines from the last marked to the top Shift + J Mark/unmark the next line after the previously marked Shift + K Mark/unmark the previous line C Copy marked lines to the clipboard Shift + C Clear marked lines Display ------- ? View/leave builtin help Q Return to the previous view/quit Shift + Q Return to the previous view/quit while matching the top times of the two views A Restore the view that was previously popped with ‘q/Q’ Shift + A Restore the view that was previously popped with ‘q/Q’ and match the top times of the views Shift + P Switch to/from the pretty-printed view of the displayed log or text files Shift + T Display the elapsed time from a bookmark to a given line. In the TEXT view, this only works for content that was captured from stdin or a :sh command. T Switch to/from the text file view I Switch to/from the histogram view Shift + I Switch to/from the histogram view V Switch to/from the SQL result view Shift + V Switch to/from the SQL result view and move to the corresponding in the log_line column P Toggle the display of the log parser results Tab In the log/text views, focus on the configuration panel for editing filters and examining the list of loaded files. In the SQL result view, cycle through columns to display as bar graphs Ctrl + L Switch to lo-fi mode. The displayed log lines will be dumped to the terminal without any decorations so they can be copied easily. Ctrl + W Toggle word-wrap. Ctrl + P Show/hide the data preview panel that may be opened when entering commands or SQL queries. Ctrl + F Toggle the enabled/disabled state of all filters in the current view. X Toggle the hiding of log message fields. The hidden fields will be replaced with three bullets and highlighted in yellow. Ctrl + X Toggle the cursor mode. Allows moving the focused line instead of keeping it fixed at the top of the current screen. = Pause/unpause loading of new file data. Session ------- Ctrl + R Reset the current session state. The session state includes things like filters, bookmarks, and hidden fields. Query Prompts ------------- / Search for lines matching a regular expression ; Open the SQLite Interface to execute SQL statements/queries : Execute an internal command, see Commands for more information | Execute an lnav script located in a format directory Ctrl + ] Abort the prompt Last modified on (UTC): Monday, October 23, 2023 Defkey © All rights reserved.