version 1.8, 2000/01/22 02:17:49 |
version 1.9, 2000/03/11 21:40:04 |
|
|
.Pp |
.Pp |
The display begins at a byte, line or 512-byte block location in the |
The display begins at a byte, line or 512-byte block location in the |
input. |
input. |
Numbers having a leading plus (``+'') sign are relative to the beginning |
Numbers having a leading plus |
of the input, for example, |
.Pq Ql + |
.Dq -c +2 |
sign are relative to the beginning of the input, for example, |
|
.Ic -c +2 |
starts the display at the second |
starts the display at the second |
byte of the input. |
byte of the input. |
Numbers having a leading minus (``-'') sign or no explicit sign are |
Numbers having a leading minus |
|
.Pq Ql - |
|
sign or no explicit sign are |
relative to the end of the input, for example, |
relative to the end of the input, for example, |
.Dq -n 2 |
.Ic -n 2 |
displays the last two lines of the input. |
displays the last two lines of the input. |
The default starting location is |
The default starting location is |
.Dq -n 10 , |
.Ic -n 10 , |
or the last 10 lines of the input. |
or the last 10 lines of the input. |
.Pp |
.Pp |
The options are as follows: |
The options are as follows: |
|
|
option causes |
option causes |
.Nm |
.Nm |
to not stop when end-of-file is reached, but rather to wait for additional |
to not stop when end-of-file is reached, but rather to wait for additional |
data to be appended to the input. If the file is replaced (i.e., the |
data to be appended to the input. |
inode number changes), |
If the file is replaced (i.e., the inode number changes), |
.Nm |
.Nm |
will reopen the file and continue. If the file is truncated, |
will reopen the file and continue. |
|
If the file is truncated, |
.Nm |
.Nm |
will reset its position back to the beginning. This makes |
will reset its position back to the beginning. |
|
This makes |
.Nm |
.Nm |
more useful for watching log files that may get rotated. |
more useful for watching log files that may get rotated. |
The |
The |
|
|
.Fl n |
.Fl n |
options modify the |
options modify the |
.Fl r |
.Fl r |
option, i.e. ``-r -c 4'' displays the last 4 characters of the last line |
option, i.e., |
of the input, while the historic tail (using the historic syntax ``-4cr'') |
.Ic -r -c 4 |
|
displays the last 4 characters of the last line |
|
of the input, while the historic tail (using the historic syntax |
|
.Ic -4cr ) |
would ignore the |
would ignore the |
.Fl c |
.Fl c |
option and display the last 4 lines of the input. |
option and display the last 4 lines of the input. |