diff options
author | Tobias Klauser <tklauser@distanz.ch> | 2006-11-08 15:52:07 +0100 |
---|---|---|
committer | Tobias Klauser <tklauser@xenon.tklauser.home> | 2006-11-08 15:52:07 +0100 |
commit | a3f1b217c76165d4e743a01cc22692774093868d (patch) | |
tree | 4eed39d1d9d82b1e2a63f9f098985667ef64d238 | |
parent | 730d47348eb9383aefc99acff13c0d906aed2df6 (diff) |
Document -n/-c +N feature
That should make inotail POSIX tail compatible
-rw-r--r-- | inotail.1 | 6 | ||||
-rw-r--r-- | inotail.c | 17 |
2 files changed, 14 insertions, 9 deletions
@@ -31,13 +31,15 @@ be in the future. .SH OPTIONS .TP .B \-c \fIN\fR, \fB\-\-bytes\fR=\fIN\fR -output the last N bytes +output the last N bytes. If the first character of N is a '+', begin printing +with the Nth character from the start of each file. .TP .B \-f, \fB\-\-follow keep the file(s) open and print appended data as the file grows .TP .B \-n \fIN\fR, \fB\-\-lines\fR=\fIN\fR -output the last N lines (default: 10) +output the last N lines (default: 10) If the first character of N is a '+', +begin printing with with the Nth line from the start of each file. .TP .B \-v, \fB\-\-verbose print headers with file names @@ -64,13 +64,16 @@ static const struct option long_opts[] = { static void usage(const int status) { - fprintf(stderr, "Usage: %s [OPTION]... [FILE]...\n\n", PROGRAM_NAME); - fprintf(stderr, " -c N, --bytes=N output the last N bytes\n"); - fprintf(stderr, " -f, --follow output as the file grows\n"); - fprintf(stderr, " -n N, --lines=N output the last N lines (default: %d)\n", DEFAULT_N_LINES); - fprintf(stderr, " -v, --verbose print headers with file names\n"); - fprintf(stderr, " -h, --help show this help and exit\n"); - fprintf(stderr, " -V, --version show version and exit\n"); + fprintf(stderr, "Usage: %s [OPTION]... [FILE]...\n\n" + " -c N, --bytes=N output the last N bytes\n" + " -f, --follow output as the file grows\n" + " -n N, --lines=N output the last N lines (default: %d)\n" + " -v, --verbose print headers with file names\n" + " -h, --help show this help and exit\n" + " -V, --version show version and exit\n\n" + "If the first character of N (the number of bytes or lines) is a `+',\n" + "begin printing with the Nth item from the start of each file, otherwise,\n" + "print the last N items in the file.\n", PROGRAM_NAME, DEFAULT_N_LINES); exit(status); } |