Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
For bugs related to Red Hat Enterprise Linux 5 product line. The current stable release is 5.10. For Red Hat Enterprise Linux 6 and above, please visit Red Hat JIRA https://issues.redhat.com/secure/CreateIssue!default.jspa?pid=12332745 to report new issues.

Bug 458827

Summary: tail command under 5.2 cannot handle + option
Product: Red Hat Enterprise Linux 5 Reporter: jas
Component: coreutilsAssignee: Ondrej Vasik <ovasik>
Status: CLOSED DUPLICATE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 5.2   
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-08-13 08:06:06 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description jas 2008-08-12 15:19:08 UTC
Description of problem:

Under Redhat Enterprise 4.X, the tail command would accept the "+numlines" argument.  On 5.2, it does not. 


Version-Release number of selected component (if applicable):

tail under 4.6 is based on coreutils 5.2.1
tail under 5.2 is based on coreutils 5.97

How reproducible:

tail +2

Actual results:

tail: cannot open `+2' for reading: No such file or directory

Expected results:

lines 2+ of file 

Note: tail -n +2 works, but "tail -2" still works (to give the last 2 lines of the file)... either tail should enforce the fact that -n needs to always be used, and hence "-2" shouldn't work, or if -2 works without -n, +2 should work as well.

Comment 1 Ondrej Vasik 2008-08-13 08:06:06 UTC
Thanks for report. It is not a bug and it was already reported few times. This behaviour is required by latest version of POSIX - which is used by coreutils-5.97 (used by RHEL-5) and later. This is documented in NEWS and coreutils info documentation. As it was reported few times, I agreed to add the description of the behaviour to tail manpages in RHEL 5.3 update. Marking that bug DUPLICATE of #287751 , see that bugzilla for possible workarounds (changing _POSIX2_VERSION to 199209 will make tail working as in RHEL-4).

*** This bug has been marked as a duplicate of bug 287751 ***