man multitail (Commandes) - browse through several files at once
NAME
multitail - browse through several files at once
SYNOPSIS
multitail [options"] options: [-cs|-Cs|-c-] [-s] [-i] inputfile [-i anotherinputfile] [...]
DESCRIPTION
The program multitail lets you view one or multiple files like the original tail program. The difference is that it creates multiple windows on your console (with ncurses). Merging of 2 or even more logfiles is possible. It can also use colors while displaying the logfiles (through regular expressions), for faster recognition of what is important and what not. It can also filter lines (again with regular expressions). It has interactive menus for editing given regular expressions and deleting and adding windows. One can also have windows with the output of shell scripts and other software. When viewing the output of external software, MultiTail can mimic the functionality of tools like 'watch' and such. When new mail arrives for the current user, the statuslines will become green. To reset this "mail has arrived"-state, press ' ' (a space). For help at any time, press F1.
OPTIONS
- -i
- Input file. You can have multiple -i file parameters. You only need to add -i file in front of a filename if the filename starts with a dash ('-').
- -I
- Same as -i but add the output to the previous window (so the output is merged).
- -iw
- -Iw Same as -i and -I but expects the parameter to be a wildcard and the second(!) an interval. Initially MultiTail will start monitoring the first file with the most recent modification time. Every interval it will check if any new files were created (or modified) and start tailing that one. *Don't forget* to put quotation marks around the filename as otherwhise the shell will try to substite them!
- -l
- Command to execute in a window. Parameter is the command. Do not forget to use "'s if the external command needs parameter! (e.g. -l "ping host").
- -L
- Same as -l but add the output to the previous window (so the output is merged).
- -t title
- With this switch, "title" is displayed in the statusline instead of the filename or commandline.
- -n number_of_lines
- Number of lines to tail initially. The default depends on the size of the terminal-window.
- -r interval
- Restart the command (started with -l/-L) after it has exited. With interval you can set how long to sleep before restarting.
- -R interval
- Same as -r, only with this one only the difference is displayed.
- -h
- The help.
- -f
- Follow the following filename, not the descriptor.
- -e
- Use the next regular expression on the following file.
- -ex
- Use regular expression on the following file and execute the command when it matches.
- -ec
- Use regular expression on the following file and display the matches.
- -eC
- Use regular expression on the following file but display everything and display the matches inverted.
- -E
- Use the next regular expression on the following files.
- -v
- Negate the next regular expression.
- -s x
- Splits the screen vertically in 'x' columns.
- -sw x
- At what position to split the screen. e.g. '-sw 20,40,,10' (=4 columns)
- -sn x
- How many windows per column for vertical split (use with -s or -sw). e.g. '-sn 3,,2'.
- -wh x
- Sets the height of a window (advisory: if it won't fit, the height is adjusted).
- -cs
- Show the next given file in colors (through syslog-scheme).
- -c
- Show the next given file in colors.
- -cS scheme
- Show the next given file using the colorscheme selected with 'scheme' (as defined in multitail.conf).
- -Cs
- Show all following files in color (through syslog-scheme).
- -C
- Show all following files in color.
- -Cf field_index delimiter
- Show all following files in color depending on field selected with field_index. Fields are delimited by the defined delimiter.
- -cf field_index delimiter
- Show the next file in color depending on field selected with field_index. Fields are delimited by the defined delimiter.
- -ci color
- Use a specific color. Usefull when merging multiple outputs.
- -cT terminalmode
- Interpret terminal codes. Only ANSI supported at this time.
- -c-
- Do NOT colorize the following file.
- -C-
- Do NOT colorize the following files.
- -d
- Do NOT update statusline.
- -D
- Do not display a statusline at all.
- -z
- Do not display "window closed" windows.
- -u
- Set screen updateinterval (for slow links).
- -m nlines
- Set buffersize Set nlines to 0 (zero) if you want no limits on the buffering.
- -M nlines
- Set the buffersize on ALL following files.
- -p x [y]
- Set linewrap: a = print everything including linewrap. l = just show everything starting at the left until the rightside of the window is reached. r = show everything starting from the right of the line. s = show everything starting with the processname. S = show everything starting after the processname. o = show everything starting at offset 'y'.
- -ke x
- Strip parts of the input using regular expression 'x'.
- -kr x y
- Strip parts of the input starting at offset x and ending (not including!) offset y.
- -kc x y
- Strip parts of the input: strip column 'y' with delimiter 'x'.
- -H interval
- Visual heart-beat (usefull when you want to keep your session alive). Interval is in seconds.
- -w
- Do not use colors.
- -b n
- Sets the TAB-width.
- --config filename
- Load the configuration from given filename.
- -x
- Set xterm-title: %f will be replaced with the last changed file, %h with the hostname, %l with the load of the system, %m with "New mail!" when the current user has new mail, %u with the current effective user, %t timestamp of last changed file, %% with a %
- -V
- Show the version and exit.
KEYS
You can press a couple of keys while the program runs. To see a list of them, press F1 (or ^h). You can press F1 (or ^h) at any time: it gives you context related information. Press 'Q' to exit the program.
EXAMPLES
- multitail /var/log/apache/access_log logfile -i -filestartingwithdatsh
- This creates three windows. One with the contents of /var/log/apache/access_log, one with the contents of logfile and so on.
- multitail -R 2 -l netstat -t
- This runs netstat every 2 seconds and then shows what has changed since the previous run. That way one can see new connections being made and closed connections fading away.
- "multitail logfile -l ping 192.168.1.3
- This creates two windows. One with the contents of logfile, one with with the output of 'ping 192.168.1.3'.
- multitail /var/log/apache/access_log -I /var/log/apache/error_log
- This creates one window with the contents of /var/log/apache/access_log merged with the contents of /var/log/apache/error_log.
- multitail -M 0 /var/log/apache/access_log -I /var/log/apache/error_log
- Same as previous example. This example will store all logged entries in a buffer so that you can later on browse through them (by pressing ' b ').
BUGS
None. This program is totally bug-free.
Well, except for the resizing of your terminal window. The program might crash when doing such things. Upgrading the ncurses library to at least version 5.3 might help in that case.
SEE ALSO
http://www.vanheusden.com/multitail/
NOTES
This page describes multitail as found in the multitail-3.3.2 package; other versions may differ slightly. Mail corrections and additions to folkert@vanheusden.com. Report bugs in the program to folkert@vanheusden.com.