Commit graph

13 commits

Author SHA1 Message Date
Jaakko Heinonen 849d265d53 Print file names without stdio buffering to avoid mixing buffered and
unbuffered ouput.

PR:		bin/176886
Reviewed by:	mjg
2013-06-09 08:06:26 +00:00
Joel Dahl da52b4caaf Remove the advertising clause from UCB copyrighted files in usr.bin. This
is in accordance with the information provided at
ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change

Also add $FreeBSD$ to a few files to keep svn happy.

Discussed with:	imp, rwatson
2010-12-11 08:32:16 +00:00
Brian Somers 22da50cfc8 Change the behaviour of -F slightly; it now persists (forever) in
trying to open files rather than giving up when it encounters an
error.  ENOENT errors are not reported.

As a result, files that are moved away then recreated are not at
risk of being 'lost' to tail.  Files that are recreated and
temporarily have unreadable permissions will be shown when they
are fixed.

This behaviour is consistent with the GNU version of tail but
without the verbiage that goes with the GNU version.

This change also fixes error messages accompanying -f and -F.
They no longer report problems with (null)!

MFC after:	3 weeks
2009-06-05 09:08:53 +00:00
Florent Thoumie aa1d7ce72f Add a -q option to suppress header lines when multiple files are specified.
Approved by:	cperciva (mentor)
MFC after:	1 week
2006-06-29 22:07:49 +00:00
Paul Richards 15a55f7926 Add support for following more than one file i.e.
tail -f file1 file2
2004-11-04 19:18:19 +00:00
Warner Losh 3f330d7d1a remove __P 2002-03-22 01:42:45 +00:00
Mark Murray 814e3a92a9 WARNS=2 fixes, use __FBSDID(). 2001-12-12 00:01:16 +00:00
Andrey A. Chernov bd9dc97512 File positions are off_t nowdays, not long, so:
long -> off_t
strtol -> strtoll
fseek -> fseeko

NOTE: that fseek not works for >long offsets files per POSIX:

[EOVERFLOW] For fseek( ), the resulting file offset would be a value which
cannot be represented correctly in an object of type long.
2001-09-01 22:22:45 +00:00
David Malone 726098d35e Fix tail to work on files bigger than 2GB.
PR:		14786
Reviewed by:	iedowse
2001-03-27 20:37:34 +00:00
Peter Wemm eb1c943900 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.
1998-04-06 16:13:49 +00:00
Peter Wemm ac5512704d Argh! caught! *blush*.. This program was supplying it's own 'err' routine
which was slightly different to the libc one.  To save any more cunfusion,
use the libc one.
1996-08-25 21:12:01 +00:00
Adam David 49a598ab87 when file can be opened for read but cannot be read from:
fail once (was twice) in forward case
fail once (was no times) in reverse case

this can happen when file is a directory on an NFS or procfs mount.
1996-07-30 13:11:43 +00:00
Rodney W. Grimes 9b50d90275 BSD 4.4 Lite Usr.bin Sources 1994-05-27 12:33:43 +00:00