MULTITAIL(1)

πŸ“¦
version 7.1.5 Β· 2 versions
, in alpine 3.24, debian trixie, epel 10, epel 9, fedora 43, fedora 44, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– MULTITAIL πŸ’–

okay bestie, welcome to MultiTail, aka the manual page for the gloriously extra file-peeping tool. it's a General Commands Manual situation, and the whole vibe is: 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] [...]

like, that's the shape of it. options, then your input files, and you can stack up as many -i inputfiles as your little heart desires πŸ’…


🌸 DESCRIPTION 🌸

okay so. MultiTail lets you view one or multiple files, exactly like the original tail program does. but here's the twist that makes it iconic: it creates multiple windows on your console (using ncurses). not one window. multiple. main character energy for your terminal πŸ”₯

it can also monitor wildcards: if another file matching the wildcard has a more recent modification date, it will automatically switch to that file. so like, you can monitor a whole entire directory of files and it just handles it. no cap 🫢

merging 2 or even more logfiles is possible. yes bestie, the logs can share a window. they can be together. it's giving community 🌈

it can also use colors while displaying the logfiles β€” through regular expressions β€” for faster recognition of what's important and what's... not. your eyeballs deserve this πŸ’œ

it can also filter lines (again, with regular expressions). filter out the noise, keep the slay ✨

it has interactive menus for editing given regular expressions and for deleting and adding windows. you're not stuck with your choices, you can just change your mind mid-stream πŸŽ€

one can also have windows with the output of shell scripts and other software. when you're viewing the output of external software, MultiTail can mimic the functionality of tools like 'watch' and such. it's a shapeshifter πŸ’«

🌸 mail alert moment: when new mail arrives for the current user, the statuslines will become green. to reset this "mail has arrived"-state, press ' ' (a space). green means go read your mail, bestie πŸ’š
πŸ†˜ stuck? for help at any time, press F1. F1 is your bestie. F1 will never leave you πŸ™ˆ

more coming, don't go anywhere πŸ’–

✨ OPTIONS ✨

okay bestie, this is the big one, the whole menu of switches, and yes we're going through all of them because every single one matters πŸ’…

  • -i file β€” pick a file to monitor. you can stack as many -i file params as you want 🫢 you only actually need the -i file in front of a filename if that filename starts with a dash (-), otherwise just drop it in.
  • -I file β€” literally the same as -i file but the output gets tossed into the previous window instead of a fresh one (so yeah, it's merged ✨).
  • -iw file interval / -Iw file interval β€” like -i / -I except the first param is a wildcard and the second(!) is an interval. at first MultiTail starts monitoring the first file with the most recent modification time, and then every interval it checks if any new files got created (or modified) and starts tailing that one πŸ‘‘ don't forget to wrap the filename in quotation marks, otherwise the shell will try to substitute them and it's giving chaos πŸ’€
  • -l command β€” a command to execute in a window. the param is the command. do not forget to use "s if the external command needs parameters! (e.g. -l "ping host").
  • -L command β€” same as -l but the output gets added to the previous window (merged, again πŸ’–).
  • -j β€” read from stdin (can only be used once, because there is only 1 stdin, obviously 🌸).
  • -J β€” same as -j but the output goes into the previous window (merged πŸŽ€).
  • --mergeall β€” merge all of the following files into the same window (peep --no-mergeall).
  • --no-mergeall β€” stop merging all files into one window (peep --mergeall).
  • --no-repeat β€” when the same line keeps repeating, it gets suppressed while printing a "Last message repeated x times" message instead. no more spam, we love to see it πŸ™ˆ
  • --mark-interval x β€” print a mark-line every x seconds when nothing else was printed.
  • -q i path β€” check path for new files with interval i, all in new windows. you can enter paths here that the shell understands, e.g. "/tmp/*". note: do not forget to add quotes around the pathname so the shell doesn't try to parse it! ⭐
  • -Q i path β€” like -q but merge them all into one window.
  • --new-only β€” for -q/-Q: only create windows for files created after MultiTail was started.
  • --closeidle x β€” close windows when no new data was processed for more than x seconds.
  • -a x β€” write the output also to file x (like tee) AFTER it was filtered by MultiTail. note: you need to put -a file BEFORE the file you're monitoring! this ordering thing is not a vibe, it's just how it is 😭
  • -A x β€” write the output also to file x (like tee) BEFORE it was filtered by MultiTail. also see the note for -a above πŸ‘†
  • -g x β€” send the output also to command x AFTER it was filtered by MultiTail.
  • -G x β€” send the output also to command x BEFORE it was filtered by MultiTail.
  • -S β€” prepend merged output with the subwindow-number.
  • -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 πŸ¦‹
  • -N number_of_lines β€” like -n but this parameter gets used for all files/commands you tail after this parameter.
  • -r interval β€” restart the command (the one started with -l/-L) after it has exited. with interval you set how long to sleep before restarting.
  • -R interval β€” restarts a command like -r only this one shows the difference in output compared to the previous run πŸ‘€
  • -rc / -Rc interval β€” like -r / -R but clears the window before each iteration.
  • -h β€” the help.
  • -f β€” follow the following filename, not the descriptor.
  • --follow-all β€” for all files after this switch: follow the following filename, not the descriptor.
  • -fr filter β€” use the predefined filter(s) from the configfile.
  • -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. the command gets the whole matching line as its commandline parameter.
  • -eX β€” like -ex but only give the matching substring as the parameter. this requires a regular expression with ( and ).
  • -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 a 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 scheme β€” show the next given file using the colorscheme selected with scheme (as defined in multitail.conf).
  • -CS scheme β€” show all following files using the colorscheme selected with scheme (as defined in multitail.conf).
  • -csn β€” extra switch for the following switches; do not use reverse (inverted) colors.
  • -cs β€” show the next given file in colors (syslog).
  • -c β€” show the next given file in colors.
  • -Cs β€” show all following files in color (through the syslog-scheme).
  • -C β€” show all following files in color.
  • -Cf field_index delimiter β€” show all following files in color depending on the field selected with field_index. fields are delimited by the defined delimiter.
  • -cf field_index delimiter β€” show the next file in color depending on the field selected with field_index. fields are delimited by the defined delimiter.
  • -ci color β€” use a specific color. super useful when you're merging multiple outputs πŸ’…
  • -cT terminalmode β€” interpret terminal codes. only ANSI is supported at this time.
  • -c- β€” do NOT colorize the following file.
  • -C- β€” do NOT colorize the following files.
  • -ts β€” add a timestamp to each line (the format is configurable in multitail.conf).
  • -Z color β€” specify the color-attributes for the markerline.
  • -T β€” a timestamp will be placed in the markerline.
  • -d β€” do NOT update the statusline.
  • -D β€” do not display a statusline at all.
  • -du β€” put the statusline above the data window.
  • -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.
  • -mb x β€” set scrollback buffer size (in bytes, use xKB/MB/GB).
  • -M nlines β€” set the buffersize on ALL following files.
  • -p x [y] β€” set linewrap, and it's giving options on options:
    • 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.
  • -P x [y] β€” like -p but for all following windows.
  • -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.
  • -ks x β€” use editscheme x from the configfile.
  • -w β€” do not use colors.
  • -b n β€” sets the TAB-width.
  • --config filename β€” load the configuration from the given filename.
  • -x β€” set xterm-title. here's the cheat sheet for the placeholders, no cap:
    • %f gets 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 %
  • -o configfile-item β€” process a configurationfile item via the commandline, in case you cannot edit the default configfile.
  • --cont β€” reconnect lines with a 'Β΄ at the end.
  • --mark-interval interval β€” when nothing comes in, print a '---mark---' line every interval seconds.
  • --mark-change β€” when multiple files are merged and multitail switches between two windows, print a markerline with the filename.
  • --no-mark-change β€” do NOT print the markerline when the file changes (this one overrides the configfile).
  • --label text β€” put text in front of each line. useful when merging multiple files and/or commands.
  • --retry β€” keep trying to open the following file if it is inaccessible.
  • --retry-all β€” like --retry but for all following files.
  • -cv x β€” use conversion scheme x (see multitail.conf).
  • --basename β€” only display the filename (and not the path) in the statusline.
  • -F file β€” use file as configfile (instead of the default configfile).
  • --no-load-global-config β€” do NOT load the global configfile.
  • --beep-interval x β€” let the terminal beep for every x-th line processed. press i in the main menu to see how many times it beeped πŸ””
  • --bi x β€” like --beep-interval but only for the current (sub-)window. stats on the number of beeps can be found in the statistics for this (sub-)window β€” press t in the main menu.
  • -H β€” show heartbeat (to keep your sessions alive) πŸ«€
  • -V β€” show the version and exit.

πŸ”‘ KEYS πŸ”‘

you can press a couple of keys while the program runs, bestie. to see a list of them, press F1 (or ^h) πŸ‘‘

the really iconic part: you can press F1 (or ^h) at any time β€” it gives you context related information, like it just knows what you need 🌈

press q to exit the program. bye bestie, it's been real πŸ’–

🌈 EXAMPLES 🌈

Okay bestie, this is the part where it all clicks. There's a whole pile more examples (and other examples) over at http://www.vanheusden.com/multitail/examples.html β€” go look, it's giving inspiration.


multitail /var/log/apache/access_log logfile -i -filestartingwithdatsh

This one creates three windows. One with the contents of /var/log/apache/access_log, one with the contents of logfile, and so on. ✨ (Yes, -i is there doing its thing and -filestartingwithdatsh is the wildcard one, iykyk.)


multitail -R 2 -l "netstat -t"

This runs netstat every 2 seconds and then shows what has changed since the previous run. That way you can literally watch new connections being made and closed connections fading away. Main character energy for your network. πŸ’…


multitail logfile -l "ping 192.168.1.3"

This creates two windows. One with the contents of logfile, one 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. Two logs, one vibe. πŸ¦‹


multitail -M 0 /var/log/apache/access_log -I /var/log/apache/error_log

Same as the previous example, no cap. This one will store all logged entries in a buffer so that you can later on browse through them β€” by pressing b. πŸ“œ


πŸŽ€ FILES πŸŽ€

  • ${XDG_CONFIG_HOME}/multitail/config β€” this is the config spot if ${XDG_CONFIG_HOME} is defined.
  • ${HOME}/.multitailrc β€” this is the config spot if ${HOME} is defined.
  • ~/.multitailrc β€” when neither ${XDG_CONFIG_HOME} nor ${HOME} is defined, it falls back to this, which will use (struct passwd*)pp->pw_dir from the pwd.h standard header. (deep lore fr fr)

πŸ’€ BUGS πŸ’€

Not me having to tell you this, but… as this program grew larger and larger over the time with new functionality sometimes added ad-hoc, some bugs may have been introduced. 😭 Please notify folkert@vanheusden.com if you find any.

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. πŸ™ˆ

Real talk: resizing = possible crash. That's not a you problem, that's a known thing.

πŸ‘‘ SEE ALSO πŸ‘‘


⭐ NOTES ⭐

This page describes MultiTail as found in the installed multitail package; other versions may differ slightly. Mail corrections and additions to folkert@vanheusden.com. Report bugs in the program to folkert@vanheusden.com. (Same email, two jobs β€” she's versatile. πŸ’…)


And that's the whole page, bestie!! πŸŽ‰ MultiTail, dated 2007-02, living in section MULTITAIL(1). Go tail some logs, you absolute icon. 🫢🌸✨