summaryrefslogtreecommitdiffstats
path: root/usr.bin/tail/tail.1
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1998-04-06 16:13:49 +0000
committerpeter <peter@FreeBSD.org>1998-04-06 16:13:49 +0000
commit7c3222498acb0b317b49cca6311ffb697172d7ca (patch)
treead45ab72c9092b4dc1f619c3792adae6338de17b /usr.bin/tail/tail.1
parent6e3ec235ff85715b4f3346989bae94f7e0aaacfe (diff)
downloadFreeBSD-src-7c3222498acb0b317b49cca6311ffb697172d7ca.zip
FreeBSD-src-7c3222498acb0b317b49cca6311ffb697172d7ca.tar.gz
Add a new -F flag which is a superset of -f. It will cause tail to
stat() the file being followed and do a close/reopen if the file has been renamed and/or rotated. This is damn useful for leaving running on files in /var/log when newsyslog(8) rotates them.
Diffstat (limited to 'usr.bin/tail/tail.1')
-rw-r--r--usr.bin/tail/tail.121
1 files changed, 20 insertions, 1 deletions
diff --git a/usr.bin/tail/tail.1 b/usr.bin/tail/tail.1
index 8c96737..be5a03f 100644
--- a/usr.bin/tail/tail.1
+++ b/usr.bin/tail/tail.1
@@ -42,7 +42,11 @@
.Nd display the last part of a file
.Sh SYNOPSIS
.Nm
-.Op Fl f Li | Fl r
+.Oo
+.Fl F |
+.Fl f |
+.Fl r
+.Oc
.Oo
.Fl b Ar number |
.Fl c Ar number |
@@ -91,6 +95,20 @@ data to be appended to the input.
The
.Fl f
option is ignored if the standard input is a pipe, but not if it is a FIFO.
+.It Fl F
+The
+.Fl F
+option implies the
+.Fl f
+option, but
+.Nm
+will also check to see if the file being followed has been renamed or rotated.
+The file is closed and reopened when
+.Nm
+detects that the filename being read from has a new inode number.
+The
+.Fl F
+option is ignored if reading from standard input rather than a file.
.It Fl n Ar number
The location is
.Ar number
@@ -136,6 +154,7 @@ utility is expected to be a superset of the
.St -p1003.2-92
specification.
In particular, the
+.Fl F ,
.Fl b
and
.Fl r
OpenPOWER on IntegriCloud