| Summary: | 'tailf' does not accept '-n 0' (zero line count) | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Bruce Jerrick <bmj001> | ||||
| Component: | util-linux-ng | Assignee: | Karel Zak <kzak> | ||||
| Status: | CLOSED UPSTREAM | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
| Severity: | medium | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | 14 | CC: | kzak | ||||
| Target Milestone: | --- | ||||||
| Target Release: | --- | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2011-03-31 07:37:10 UTC | Type: | --- | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Attachments: |
|
||||||
All these bugs are already fixed in upstream tree. The changes will be probably available in F-15. |
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').