Bug 692263 - 'tailf' does not accept '-n 0' (zero line count)
Summary: 'tailf' does not accept '-n 0' (zero line count)
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: util-linux-ng
Version: 14
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
Assignee: Karel Zak
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-03-30 20:47 UTC by Bruce Jerrick
Modified: 2011-03-31 07:37 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-03-31 07:37:10 UTC
Type: ---


Attachments (Terms of Use)
Patch for tailf in util-linux(-ng) (969 bytes, application/octet-stream)
2011-03-30 20:47 UTC, Bruce Jerrick
no flags Details

Description Bruce Jerrick 2011-03-30 20:47:35 UTC
Created attachment 488897 [details]
Patch for tailf in util-linux(-ng)

Description of problem:
'tailf' does not accept a zero line count (i.e., '-n 0') -- useful for
seeing only new arrivals.
'tail -f' does accept it; the two should be compatible.

Version-Release number of selected component (if applicable):
util-linux-ng-2.18-4.8.fc14.i686
util-linux-2.19-1.fc15.i686

How reproducible:
100%

Steps to Reproduce:
1. tailf -n 0 /var/log/messages

Actual results:
tailf: invalid number of lines

Expected results:
Nothing printed (until new entries to /var/log/messages are made).

Additional info:
A patch is attached (use with '-p1' in spec file).  Changes are simple:
    Two instances of "<=" changed to "<" (in argv processing).
    Call tailf() only if lines > 0 .

BTW, unlike 'tail', 'tailf' insists on a space after the '-n' (i.e., it
must be '-n 0', not '-n0').

Comment 1 Karel Zak 2011-03-31 07:37:10 UTC
All these bugs are already fixed in upstream tree. The changes will be probably available in F-15.


Note You need to log in before you can comment on or make changes to this bug.