LNAV(1) General Commands Manual LNAV(1)

lnav - log file viewer for the terminal

lnav [options] [logfile1 logfile2 ...]

The Logfile Navigator, lnav, is a log file viewer for the terminal. Given a set of files/directories, lnav will:

?
View/leave the online help text.
Quit the program.

Print help and exit
Display the internal help text.
Add the given configuration directory to the search path.
Print warnings related to lnav's configuration.
Update formats installed from git repositories.
Write debug messages to the given file.
Print version information.
Recursively load files from the given directories.
Load older rotated log files as well.
Execute a command after the files have been loaded.
Execute the commands in the given file.
Execute a shell command-line.
Prepend timestamps to the lines of data being read in on the standard input.
Run without the curses UI. (headless mode)
Do not open the default syslog file if no files are given.
-q
Quiet mode. Do not print the log messages after executing all of the commands.

The log files or directories to view. If a directory is given, all of the files in the directory will be loaded.

Install the given format files in the $HOME/.lnav/formats/installed directory and exit.
Switch to the management command-line mode. This mode is used to work with lnav's configuration.
Check the configuration and exit. The log format files will be loaded and checked. Any files given on the command-line will be loaded checked to make sure they match a log format.

To load and follow the syslog file:

lnav

To load all of the files in /var/log:

lnav /var/log

To watch the output of make with timestamps prepended:

make 2>&1 | lnav -t

This manual page was written by Salvatore Bonaccorso <carnil@debian.org> for the Debian system (but may be used by others).

April 2024