Red Hat Bugzilla – Bug 458827
tail command under 5.2 cannot handle + option
Last modified: 2008-08-13 04:06:06 EDT
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
tail: cannot open `+2' for reading: No such file or directory
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.
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 ***