87 lines · 1.4 KB · Text
RawDownload
.TH TAIL 1.SH NAMEtail \- deliver the last part of a file.SH SYNOPSIS.B tail[.BR +- \fInumber\fP[ lbc ][ rf ]][.I file].PP.B tail[.B -fr][.B -n.I nlines][.B -c.I nbytes][.I file].SH DESCRIPTION.I Tailcopies the named file to the standard output beginningat a designated place.If no file is named, the standard input is copied..PPCopying begins at position.BI + numbermeasured from the beginning, or.BI - numberfrom the end of the input..I Numberis counted in lines, 1K blocks or bytes,according to the appended flag.LR l ,.LR b ,or.LR c .Default is.B -10l(ten ell)..PPThe further flag.L rcauses tail to print lines from the end of the file in reverse order;.L f(follow) causes.IR tail ,after printing to the end, to keep watch andprint further data as it appears..PPThe second syntax is that promulgated by POSIX, wherethe.I numbersrather than the options are signed..SH EXAMPLES.TP.B tail filePrint the last 10 lines of a file..TP.B tail +0f filePrint a file, and continue to watchdata accumulate as it grows..TP.B sed 10q filePrint the first 10 lines of a file..SH SOURCE.B /sys/src/cmd/tail.c.SH BUGSTails relative to the end of the fileare treasured up in a buffer, and thusare limited in length..PPAccording to custom, option.BI + numbercounts lines from 1, and countsblocks and bytes from 0..PP.I Tailis ignorant of UTF.