Print this page
3484 enhance and document tail follow support
Reviewed by: Joshua M. Clulow <jmc@joyent.com>

*** 5,15 **** .\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. .\" This notice shall appear on any product containing this material. .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] ! .TH TAIL 1 "Jul 13, 2005" .SH NAME tail \- deliver the last part of a file .SH SYNOPSIS .LP .nf --- 5,16 ---- .\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. .\" This notice shall appear on any product containing this material. .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] ! .\" Copyright (c) 2013, Joyent, Inc. All Rights Reserved. ! .TH TAIL 1 "Jan 18, 2013" .SH NAME tail \- deliver the last part of a file .SH SYNOPSIS .LP .nf
*** 21,36 **** \fB/usr/bin/tail\fR [\fB-lbcr\fR] [\fIfile\fR] .fi .LP .nf ! \fB/usr/bin/tail\fR [\(+- \fInumber\fR [lbcf]] [\fIfile\fR] .fi .LP .nf ! \fB/usr/bin/tail\fR [\fB-lbcf\fR] [\fIfile\fR] .fi .LP .nf \fB/usr/xpg4/bin/tail\fR [\fB-f\fR | \fB-r\fR] [\fB-c\fR \fInumber\fR | \fB-n\fR \fInumber\fR] [\fIfile\fR] --- 22,37 ---- \fB/usr/bin/tail\fR [\fB-lbcr\fR] [\fIfile\fR] .fi .LP .nf ! \fB/usr/bin/tail\fR [\(+- \fInumber\fR [lbcfF]] [\fIfile\fR] .fi .LP .nf ! \fB/usr/bin/tail\fR [\fB-lbcfF\fR] [\fIfile\fR] .fi .LP .nf \fB/usr/xpg4/bin/tail\fR [\fB-f\fR | \fB-r\fR] [\fB-c\fR \fInumber\fR | \fB-n\fR \fInumber\fR] [\fIfile\fR]
*** 90,106 **** .ne 2 .na \fB\fB-f\fR \fR .ad .RS 7n ! Follow. If the input-file is not a pipe, the program does not terminate after ! the line of the input-file has been copied, but enters an endless loop, wherein ! it sleeps for a second and then attempts to read and copy further records from ! the input-file. Thus it can be used to monitor the growth of a file that is ! being written by some other process. .RE .sp .ne 2 .na \fB\fB-l\fR \fR .ad --- 91,120 ---- .ne 2 .na \fB\fB-f\fR \fR .ad .RS 7n ! Follow. If the input-file is not a pipe, \fBtail\fR does not terminate after ! the last line of the input-file has been copied, but enters an endless loop, ! wherein it watches the file for modifications and attempts to read and copy ! further records from the input-file. Thus it can be used to monitor the growth ! of a file that is being written by some other process. If the watched file is ! truncated \fBtail\fR will begin reading records from the start of the file. .RE + .sp + .ne 2 + .na + \fB\fB-F\fR \fR + .ad + .RS 7n + Follow named file. Operates as with \fB-f\fR, except that if the file is moved + (e.g. if a watched log file is rotated) \fBtail\fR will close the original file + and begin reading records from the start of the file with the specified name + if and when that file is recreated. + .RE + .sp .ne 2 .na \fB\fB-l\fR \fR .ad