Go to file
Peter J. Holzer 5d42d92598 Tolerate some other file access problems 2024-05-25 00:09:33 +02:00
README.md Update and improve documentation 2022-03-19 10:57:32 +01:00
kitsune Tolerate some other file access problems 2024-05-25 00:09:33 +02:00

README.md

Kitsune

Kitsune is multi-tail program. If will monitor multiple files or directories and output any new content from those files to stdout.

The standard unix tail(1) utility already does this for multiple files, but it cannot detect new files in a directory and I also find its output format to be not very useful for watching multiple log files.

Usage

kitsune [--match-filename pattern] [--start] [paths]

There are zero or more paths. If 0 paths are provided, "." (the current directory) is assumed. Each path can be either a file or a directory to be watched. Files are dumped to stdout entirely and then watched for new content. If a file is replaced, kitsune will notice it and follow the new file automatically. For a directory, all files matching pattern are added to the list of files and then the directory will be monitored and any new file matching pattern will also added.

pattern is a standard shell glob pattern (as implemented by Pythons fnmatch module).

By default, kitsune will print only content added after program start. The --start option will dump each file from the beginning.

The output contains of the file name, a timestamp, a deletion indicator and the contents of each line for each line in the watched files. It pads the file names to the length of the longest file name seen so far, so the three columns should line up nicely.

Name

Kitsune means fox in Japanese. It can be the actual animal or a fox-shaped spirit, and the latter is often depicted with multiple (usually nine) tails. When I was scouring Wikipedia for multi-tailed mythical beasts, this was one of the first I found. There is also a connection to music which is always a plus.