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 substite 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.
101
102       -A x   Write  the  output  also  to file 'x' (like 'tee') BEFORE it was
103              filtered by MultiTail.
104
105       -g x   Send the output also to command 'x' AFTER  it  was  filtered  by
106              MultiTail.
107
108       -G x   Send  the  output  also to command 'x' BEFORE it was filtered by
109              MultiTail.
110
111       -S     Prepend merged output with subwindow-number.
112
113       -t title
114              With this switch, "title" is displayed in the statusline instead
115              of the filename or commandline.
116
117       -n number_of_lines
118              Number  of  lines  to tail initially. The default depends on the
119              size of the terminal-window.
120
121       -r interval
122              Restart the command (started with -l/-L) after  it  has  exited.
123              With interval you can set how long to sleep before restarting.
124
125       -R interval
126              Restarts a command like -r only this one shows the difference in
127              output compared to the previous run.
128
129       -rc / -Rc interval
130              Like -r / -R but clears the window before each iteration.
131
132       -h     The help.
133
134       -f     Follow the following filename, not the descriptor.
135
136       --follow-all
137              For all files after this switch: follow the following  filename,
138              not the descriptor.
139
140       -fr filter
141              Use the predefined filter(s) from the configfile.
142
143       -e     Use the next regular expression on the following file.
144
145       -ex    Use  regular  expression  on  the following file and execute the
146              command when it matches. The command gets as commandline parame‐
147              ter the whole matching line.
148
149       -eX    Like  '-ex'  but  only give the matching substring as parameter.
150              This requires a regular expression with '(' and ')'.
151
152       -ec    Use regular expression on the following  file  and  display  the
153              matches.
154
155       -eC    Use  regular expression on the following file but display every‐
156              thing and display the matches inverted.
157
158       -E     Use the next regular expression on the following files.
159
160       -v     Negate the next regular expression.
161
162       -s x   Splits the screen vertically in 'x' columns.
163
164       -sw x  At what position to split the screen. e.g. '-sw  20,40,,10'  (=4
165              columns)
166
167       -sn x  How  many  windows per column for vertical split (use with -s or
168              -sw). e.g. '-sn 3,,2'.
169
170       -wh x  Sets the height of a window (advisory:  if  it  won't  fit,  the
171              height is adjusted).
172
173       -cS scheme
174              Show  the  next  given  file using the colorscheme selected with
175              'scheme' (as defined in multitail.conf).
176
177       -CS scheme
178              Show all following files using  the  colorscheme  selected  with
179              'scheme' (as defined in multitail.conf).
180
181       -csn   Extra  switch  for  the  following  switches; do not use reverse
182              (inverted) colors.
183
184       -cs    Show the next given file in colors (syslog).
185
186       -c     Show the next given file in colors.
187
188       -Cs    Show all following files in color (through syslog-scheme).
189
190       -C     Show all following files in color.
191
192       -Cf field_index delimiter
193              Show all following files in color depending  on  field  selected
194              with field_index. Fields are delimited by the defined delimiter.
195
196       -cf field_index delimiter
197              Show  the  next  file  in color depending on field selected with
198              field_index. Fields are delimited by the defined delimiter.
199
200       -ci color
201              Use a specific color. Usefull when merging multiple outputs.
202
203       -cT terminalmode
204              Interpret terminal codes. Only ANSI supported at this time.
205
206       -c-    Do NOT colorize the following file.
207
208       -C-    Do NOT colorize the following files.
209
210       -ts    Add a timestamp to each line (format is configurable  in  multi‐
211              tail.conf).
212
213       -Z color
214              Specify the color-attributes for the markerline.
215
216       -T     A timestamp will be placed in the markerline.
217
218       -d     Do NOT update statusline.
219
220       -D     Do not display a statusline at all.
221
222       -du    Put the statusline above the data window.
223
224       -z     Do not display "window closed" windows.
225
226       -u     Set screen updateinterval (for slow links).
227
228       -m nlines
229              Set  buffersize  Set nlines to 0 (zero) if you want no limits on
230              the buffering.
231
232       -mb x  Set scrollback buffer size (in bytes, use xKB/MB/GB).
233
234       -M nlines
235              Set the buffersize on ALL following files.
236
237       -p x [y]
238              Set linewrap: a = print everything including linewrap. l =  just
239              show  everything starting at the left until the rightside of the
240              window is reached. r = show everything starting from  the  right
241              of  the line. s = show everything starting with the processname.
242              S = show everything starting after the  processname.  o  =  show
243              everything starting at offset 'y'.
244
245       -P x [y]
246              Like -p but for all following windows.
247
248       -ke x  Strip parts of the input using regular expression 'x'.
249
250       -kr x y
251              Strip  parts  of  the input starting at offset x and ending (not
252              including!) offset y.
253
254       -kc x y
255              Strip parts of the input: strip column 'y' with delimiter 'x'.
256
257       -ks x  Use editscheme 'x' from configfile.
258
259       -w     Do not use colors.
260
261       -b n   Sets the TAB-width.
262
263       --config filename
264              Load the configuration from given filename.
265
266       -x     Set xterm-title: %f will be replaced with the last changed file,
267              %h  with  the  hostname, %l with the load of the system, %m with
268              "New mail!" when the current user has new mail, %u with the cur‐
269              rent  effective user, %t timestamp of last changed file, %% with
270              a %
271
272       -o configfile-item
273              Proces a configurationfile item via the commandline in case  you
274              cannot edit the default configfile.
275
276       --cont Reconnect lines with a '´ at the end.
277
278       --mark-interval interval
279              When  nothing  comes in, print a '---mark---' line every 'inter‐
280              val' seconds.
281
282       --mark-change
283              When multiple files are merged an multitail switches between two
284              windows, print a markerline with the filename.
285
286       --no-mark-change
287              Do NOT print the markerline when the file changes (overrides the
288              configfile).
289
290       --label text
291              Put "text" in front of each line. Usefull when merging  multiple
292              files and/or commands.
293
294       --retry
295              Keep trying to open the following file if it is inaccessible.
296
297       --retry-all
298              Like --retry but for all following files.
299
300       -cv x  Use conversion scheme 'x' (see multitail.conf).
301
302       --basename
303              Only display the filename (and not the path) in the statusline.
304
305       -F file
306              Use 'file' as configfile (instead of default configfile).
307
308       --no-load-global-config
309              Do NOT load the global configfile.
310
311       --beep-interval x
312              Let  the  terminal beep for every x-th line processed. Press 'i'
313              in the main menu to see how many times it beeped.
314
315       --bi x Like '--beep-interval' but only for current  (sub-)window.  Sta‐
316              tistics  on  the  number of beeps can be found in the statistics
317              for this (sub-)window. Press 't' in the main menu.
318
319       -H     Show heartbeat (to keep your sessions alive).
320
321       -V     Show the version and exit.
322
323

KEYS

325       You can press a couple of keys while the program runs.  To see  a  list
326       of  them,  press  F1  (or ^h). You can press F1 (or ^h) at any time: it
327       gives you context related information.  Press 'q' to exit the program.
328
329

EXAMPLES

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

BUGS

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

SEE ALSO

371       http://www.vanheusden.com/multitail/
372
373

NOTES

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