Add README

This commit is contained in:
Peter J. Holzer 2022-02-16 00:04:10 +01:00 committed by Peter J. Holzer
parent a4d54b8ca1
commit d17173aaff
1 changed files with 41 additions and 0 deletions

41
README.md Normal file
View File

@ -0,0 +1,41 @@
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] [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).
The output contains of the file name, a timestamp 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.