1MULTITAIL(1)                General Commands Manual               MULTITAIL(1)
2
3
4

NAME

6       MultiTail - browse through several files at once
7

SYNOPSIS

9       multitail [options]
10
11       options: [-cs|-Cs|-c-] [-s] [-i] inputfile [-i anotherinputfile] [...]
12
13

DESCRIPTION

15       The  program  MultiTail  lets  you  view one or multiple files like the
16       original tail program. The difference is that it creates multiple  win‐
17       dows  on your console (with ncurses). It can also monitor wildcards: if
18       another file matching the wildcard has a more recent modification date,
19       it  will automatically switch to that file. That way you can, for exam‐
20       ple, monitor a complete directory of files. Merging of 2 or  even  more
21       logfiles  is possible. It can also use colors while displaying the log‐
22       files (through regular expressions), for faster recognition of what  is
23       important  and  what  not. It can also filter lines (again with regular
24       expressions). It  has  interactive  menus  for  editing  given  regular
25       expressions  and deleting and adding windows. One can also have windows
26       with the output of shell scripts and other software. When  viewing  the
27       output  of  external software, MultiTail can mimic the functionality of
28       tools like 'watch' and such. When new  mail  arrives  for  the  current
29       user,  the  statuslines  will  become  green.  To  reset this "mail has
30       arrived"-state, press ' ' (a space). For help at any time, press F1.
31
32

OPTIONS

34       -i file
35              Select a file to monitor. You can have multiple -i file  parame‐
36              ters.   You  only  need to add -i file in front of a filename if
37              the filename starts with a dash ('-').
38
39       -I file
40              Same as -i file but add the output to the  previous  window  (so
41              the output is merged).
42
43       -iw file interval
44              -Iw file interval Like '-i'/'-I' but expects the parameter to be
45              a wildcard and the second(!) an interval.   Initially  MultiTail
46              will  start monitoring the first file with the most recent modi‐
47              fication time. Every interval it will check  if  any  new  files
48              were  created  (or  modified) and start tailing that one. *Don't
49              forget* to put quotation marks around the filename as otherwhise
50              the shell will try to substitute them!
51
52       -l command
53              Command to execute in a window. Parameter is the command. Do not
54              forget to use "'s if the external command needs parameter! (e.g.
55              -l "ping host").
56
57       -L command
58              Same  as  -l  but  add the output to the previous window (so the
59              output is merged).
60
61       -j     Read from stdin (can be used  only  once  as  there  is  only  1
62              stdin).
63
64       -J     Same  as  -j  but  add the output to the previous window (so the
65              output is merged).
66
67       --mergeall
68              Merge all of the following  files  into  the  same  window  (see
69              '--no-mergeall').
70
71       --no-mergeall
72              Stop merging all files into one window (see '--mergeall');
73
74       --no-repeat
75              When  the  same  line  is  repeated, it will be suppressed while
76              printing a "Last message repeated x times" message.
77
78       --mark-interval x
79              Print every 'x'  seconds  a  mark-line  when  nothing  else  was
80              printed.
81
82       -q i path
83              Check  path for new files with interval 'i', all in new windows.
84              One can enter paths here understood by the shell. E.g. "/tmp/*".
85              Note: do not forget to add quotes around the pathname to prevent
86              the shell from parsing it!
87
88       -Q i path
89              Like -q: but merge them all in one window.
90
91       --new-only
92              For -q/-Q: only create windows for files created after MultiTail
93              was started.
94
95       --closeidle x
96              Close  windows  when  more then 'x' seconds no new data was pro‐
97              cessed.
98
99       -a x   Write the output also to file 'x' (like 'tee') AFTER it was fil‐
100              tered  by  MultiTail.  Note: you need to put "-a file" BEFORE to
101              the file you're monitoring!
102
103       -A x   Write the output also to file 'x' (like  'tee')  BEFORE  it  was
104              filtered by MultiTail. Also see the note for "-a".
105
106       -g x   Send  the  output  also  to command 'x' AFTER it was filtered by
107              MultiTail.
108
109       -G x   Send the output also to command 'x' BEFORE it  was  filtered  by
110              MultiTail.
111
112       -S     Prepend merged output with subwindow-number.
113
114       -t title
115              With this switch, "title" is displayed in the statusline instead
116              of the filename or commandline.
117
118       -n number_of_lines
119              Number of lines to tail initially. The default  depends  on  the
120              size of the terminal-window.
121
122       -N number_of_lines
123              Like  -n  but this parameter will be used for all files/commands
124              you tail after this parameter.
125
126       -r interval
127              Restart the command (started with -l/-L) after  it  has  exited.
128              With interval you can set how long to sleep before restarting.
129
130       -R interval
131              Restarts a command like -r only this one shows the difference in
132              output compared to the previous run.
133
134       -rc / -Rc interval
135              Like -r / -R but clears the window before each iteration.
136
137       -h     The help.
138
139       -f     Follow the following filename, not the descriptor.
140
141       --follow-all
142              For all files after this switch: follow the following  filename,
143              not the descriptor.
144
145       -fr filter
146              Use the predefined filter(s) from the configfile.
147
148       -e     Use the next regular expression on the following file.
149
150       -ex    Use  regular  expression  on  the following file and execute the
151              command when it matches. The command gets as commandline parame‐
152              ter the whole matching line.
153
154       -eX    Like  '-ex'  but  only give the matching substring as parameter.
155              This requires a regular expression with '(' and ')'.
156
157       -ec    Use regular expression on the following  file  and  display  the
158              matches.
159
160       -eC    Use  regular expression on the following file but display every‐
161              thing and display the matches inverted.
162
163       -E     Use the next regular expression on the following files.
164
165       -v     Negate the next regular expression.
166
167       -s x   Splits the screen vertically in 'x' columns.
168
169       -sw x  At what position to split the screen. e.g. '-sw  20,40,,10'  (=4
170              columns)
171
172       -sn x  How  many  windows per column for vertical split (use with -s or
173              -sw). e.g. '-sn 3,,2'.
174
175       -wh x  Sets the height of a window (advisory:  if  it  won't  fit,  the
176              height is adjusted).
177
178       -cS scheme
179              Show  the  next  given  file using the colorscheme selected with
180              'scheme' (as defined in multitail.conf).
181
182       -CS scheme
183              Show all following files using  the  colorscheme  selected  with
184              'scheme' (as defined in multitail.conf).
185
186       -csn   Extra  switch  for  the  following  switches; do not use reverse
187              (inverted) colors.
188
189       -cs    Show the next given file in colors (syslog).
190
191       -c     Show the next given file in colors.
192
193       -Cs    Show all following files in color (through syslog-scheme).
194
195       -C     Show all following files in color.
196
197       -Cf field_index delimiter
198              Show all following files in color depending  on  field  selected
199              with field_index. Fields are delimited by the defined delimiter.
200
201       -cf field_index delimiter
202              Show  the  next  file  in color depending on field selected with
203              field_index. Fields are delimited by the defined delimiter.
204
205       -ci color
206              Use a specific color. Usefull when merging multiple outputs.
207
208       -cT terminalmode
209              Interpret terminal codes. Only ANSI supported at this time.
210
211       -c-    Do NOT colorize the following file.
212
213       -C-    Do NOT colorize the following files.
214
215       -ts    Add a timestamp to each line (format is configurable  in  multi‐
216              tail.conf).
217
218       -Z color
219              Specify the color-attributes for the markerline.
220
221       -T     A timestamp will be placed in the markerline.
222
223       -d     Do NOT update statusline.
224
225       -D     Do not display a statusline at all.
226
227       -du    Put the statusline above the data window.
228
229       -z     Do not display "window closed" windows.
230
231       -u     Set screen updateinterval (for slow links).
232
233       -m nlines
234              Set  buffersize  Set nlines to 0 (zero) if you want no limits on
235              the buffering.
236
237       -mb x  Set scrollback buffer size (in bytes, use xKB/MB/GB).
238
239       -M nlines
240              Set the buffersize on ALL following files.
241
242       -p x [y]
243              Set linewrap: a = print everything including linewrap. l =  just
244              show  everything starting at the left until the rightside of the
245              window is reached. r = show everything starting from  the  right
246              of  the line. s = show everything starting with the processname.
247              S = show everything starting after the  processname.  o  =  show
248              everything starting at offset 'y'.
249
250       -P x [y]
251              Like -p but for all following windows.
252
253       -ke x  Strip parts of the input using regular expression 'x'.
254
255       -kr x y
256              Strip  parts  of  the input starting at offset x and ending (not
257              including!) offset y.
258
259       -kc x y
260              Strip parts of the input: strip column 'y' with delimiter 'x'.
261
262       -ks x  Use editscheme 'x' from configfile.
263
264       -w     Do not use colors.
265
266       -b n   Sets the TAB-width.
267
268       --config filename
269              Load the configuration from given filename.
270
271       -x     Set xterm-title: %f will be replaced with the last changed file,
272              %h  with  the  hostname, %l with the load of the system, %m with
273              "New mail!" when the current user has new mail, %u with the cur‐
274              rent  effective user, %t timestamp of last changed file, %% with
275              a %
276
277       -o configfile-item
278              Proces a configurationfile item via the commandline in case  you
279              cannot edit the default configfile.
280
281       --cont Reconnect lines with a '´ at the end.
282
283       --mark-interval interval
284              When  nothing  comes in, print a '---mark---' line every 'inter‐
285              val' seconds.
286
287       --mark-change
288              When multiple files are merged an multitail switches between two
289              windows, print a markerline with the filename.
290
291       --no-mark-change
292              Do NOT print the markerline when the file changes (overrides the
293              configfile).
294
295       --label text
296              Put "text" in front of each line. Usefull when merging  multiple
297              files and/or commands.
298
299       --retry
300              Keep trying to open the following file if it is inaccessible.
301
302       --retry-all
303              Like --retry but for all following files.
304
305       -cv x  Use conversion scheme 'x' (see multitail.conf).
306
307       --basename
308              Only display the filename (and not the path) in the statusline.
309
310       -F file
311              Use 'file' as configfile (instead of default configfile).
312
313       --no-load-global-config
314              Do NOT load the global configfile.
315
316       --beep-interval x
317              Let  the  terminal beep for every x-th line processed. Press 'i'
318              in the main menu to see how many times it beeped.
319
320       --bi x Like '--beep-interval' but only for current  (sub-)window.  Sta‐
321              tistics  on  the  number of beeps can be found in the statistics
322              for this (sub-)window. Press 't' in the main menu.
323
324       -H     Show heartbeat (to keep your sessions alive).
325
326       -V     Show the version and exit.
327
328

KEYS

330       You can press a couple of keys while the program runs.  To see  a  list
331       of  them,  press  F1  (or ^h). You can press F1 (or ^h) at any time: it
332       gives you context related information.  Press 'q' to exit the program.
333
334

EXAMPLES

336       See  http://www.vanheusden.com/multitail/examples.html  for  more   and
337       other examples.
338
339       multitail /var/log/apache/access_log logfile -i -filestartingwithdatsh
340              This   creates   three   windows.   One  with  the  contents  of
341              /var/log/apache/access_log, one with the contents of logfile and
342              so on.
343
344       multitail -R 2 -l "netstat -t"
345              This  runs  netstat  every  2  seconds  and  then shows what has
346              changed since the previous run. That way one can see new connec‐
347              tions being made and closed connections fading away.
348
349       multitail logfile -l "ping 192.168.1.3"
350              This  creates two windows. One with the contents of logfile, one
351              with with the output of 'ping 192.168.1.3'.
352
353       multitail /var/log/apache/access_log -I /var/log/apache/error_log
354              This   creates    one    window    with    the    contents    of
355              /var/log/apache/access_log   merged   with   the   contents   of
356              /var/log/apache/error_log.
357
358       multitail -M 0 /var/log/apache/access_log -I /var/log/apache/error_log
359              Same as previous example. This example  will  store  all  logged
360              entries in a buffer so that you can later on browse through them
361              (by pressing ' b
362               ').
363
364

BUGS

366       As this program grew larger and larger over the time with new function‐
367       ality  sometimes  added  ad-hoc,  some  bugs  may have been introduced.
368       Please notify folkert@vanheusden.com if you find any.
369
370       Well, except for the resizing of  your  terminal  window.  The  program
371       might crash when doing such things. Upgrading the ncurses library to at
372       least version 5.3 might help in that case.
373
374

SEE ALSO

376       http://www.vanheusden.com/multitail/
377
378

NOTES

380       This page describes MultiTail as found in the multitail-4.3.1  package;
381       other  versions may differ slightly.  Mail corrections and additions to
382       folkert@vanheusden.com.  Report bugs in the program to folkert@vanheus‐
383       den.com.
384
385
386
387MultiTail                           2007-02                       MULTITAIL(1)
Impressum