summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--inotail.16
-rw-r--r--inotail.c17
2 files changed, 14 insertions, 9 deletions
diff --git a/inotail.1 b/inotail.1
index a623f0a..9145dec 100644
--- a/inotail.1
+++ b/inotail.1
@@ -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
diff --git a/inotail.c b/inotail.c
index e07f118..fefde0d 100644
--- a/inotail.c
+++ b/inotail.c
@@ -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);
}