From d17173aaff8d2e1af6b5107265e9ce0b0f0dc21c Mon Sep 17 00:00:00 2001 From: "Peter J. Holzer" Date: Wed, 16 Feb 2022 00:04:10 +0100 Subject: [PATCH] Add README --- README.md | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..c68df04 --- /dev/null +++ b/README.md @@ -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.