bin/53288: tail will sometimes display more lines than it is told

Friedemann Becker Friedemann.Becker at web.de
Wed Jan 14 04:20:17 PST 2004


The following reply was made to PR bin/53288; it has been noted by GNATS.

From: Friedemann Becker <Friedemann.Becker at web.de>
To: freebsd-gnats-submit at FreeBSD.org
Cc:  
Subject: Re: bin/53288: tail will sometimes display more lines than it is
 told
Date: Wed, 14 Jan 2004 13:19:45 +0100

 This is a multi-part message in MIME format.
 --------------080400060907090409020109
 Content-Type: text/plain; charset=us-ascii; format=flowed
 Content-Transfer-Encoding: 7bit
 
 I wrote this little note for the tail.1 manpage.
 I am still new to this and I'm not sure, if this should be mentioned in
 the manpage or not.
 If the text is ok, please someone proofread and maybe commit it.
 Otherwise, some commentary would be nice.
 thanks
 
 
 
 
 --------------080400060907090409020109
 Content-Type: text/plain;
  name="tail.1"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: inline;
  filename="tail.1"
 
 --- tail.1.orig	Tue Jan 13 00:18:41 2004
 +++ tail.1	Tue Jan 13 00:50:54 2004
 @@ -181,3 +181,22 @@
  A
  .Nm
  command appeared in PWB UNIX.
 +.Sh BUGS
 +When
 +.Nm
 +is used on a file that is being written to, the number of lines (bytes
 +or blocks, respectively) of the output can be significantly different
 +from what has been specified by the
 +.Fl n ,
 +.Fl c
 +or
 +.Fl b
 +option. This happens when data is is beeing appended to the file
 +after
 +.Nm
 +has calculated the starting point for the output.
 +
 +To avoid this send the data through a pipe, as in
 +.Dl "cat growing_file | tail -n 20"
 +.Pp
 +This should give correct results.
 
 
 
 --------------080400060907090409020109--
 


More information about the freebsd-bugs mailing list