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

KEYS

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

EXAMPLES

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

BUGS

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

SEE ALSO

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

NOTES

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