xtail - watch the growth of files
xtail [-h] file ...
The display begins at a byte, line or 512-byte block location in the input. Numbers having a leading plus (+) sign are relative to the beginning of the input, for example, -c +2 starts the display at the second byte of the input. Numbers having a leading minus (-) sign or no explicit sign are relative to the end of the input, for example, -n 2 displays the last two lines of the input. The default starting location is -n 10, or the last 10 lines of the input.
The xtail utility monitors one or more files, and displays all data written to a file since command invocation. It is very useful for monitoring multiple logfiles simultaneously. It may be invoked by renaming tail to xtail, or by calling tail with the -f option.
With xtail or tail -f, if an entry given on the command line is a directory, all files in that directory will be monitored, including those created after the invocation. If an entry given on the command line doesn't exist, the program will watch for it and monitor it once created. When switching files in the display, a banner showing the pathname of the file is printed.
An interrupt character (usually CTRL/C or DEL) will display a list of the most recently modified files being watched. Send a quit signal (usually CTRL/backslash) to stop the program.
The options are the following for tail (only the -h option is supported by xtail) :
This header also appears with the -f option, when the file inode has changed.
The tail utility exits 0 on success or >0 if an error occurred.
cat,
head,
sed
The historic command line syntax of tail is supported by this implementation. The only difference between this implementation and historic versions of tail, once the command line syntax translation has been done, is that the -b, -c and -n options modify the -r option, i.e. -r -c 4 displays the last 4 characters of the last line of the input, while the historic tail (using the historic syntax -4cr) would ignore the -c option and display the last 4 lines of the input.
The original version of xtail was written by Chip Rosenthal.
Since tail -f or xtail catches the INT signals (CTRL-C), the program must be stopped a QUIT signal (CTRL-D) or by some other means, for instance CTRL-Pause on Windows.
This documentation comes from the BSD tail
man page and from
the xtail man page. The integration of xtail was Tom Christiansen's idea.