GNU bug report logs - #9370
"tail -f -1" should work

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: coreutils; Severity: wishlist; Reported by: Eli the Beareded <gnu-bugs@HIDDEN>; dated Thu, 25 Aug 2011 06:22:01 UTC; Maintainer for coreutils is bug-coreutils@HIDDEN.
Severity set to 'wishlist' from 'normal' Request was from Jim Meyering <jim@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 9370 <at> debbugs.gnu.org:


Received: (at 9370) by debbugs.gnu.org; 13 Sep 2011 12:22:36 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Sep 13 08:22:36 2011
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1R3S0Z-0001SE-TL
	for submit <at> debbugs.gnu.org; Tue, 13 Sep 2011 08:22:36 -0400
Received: from mx1.redhat.com ([209.132.183.28])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <jim@HIDDEN>) id 1R3S0X-0001S7-8c
	for 9370 <at> debbugs.gnu.org; Tue, 13 Sep 2011 08:22:34 -0400
Received: from int-mx12.intmail.prod.int.phx2.redhat.com
	(int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25])
	by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p8DCI5OL025199
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Tue, 13 Sep 2011 08:18:05 -0400
Received: from mx.meyering.net (ovpn01.gateway.prod.ext.phx2.redhat.com
	[10.5.9.1])
	by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP
	id p8DCI4wS026783; Tue, 13 Sep 2011 08:18:05 -0400
Received: from rho.meyering.net (localhost.localdomain [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id 176CE6005B;
	Tue, 13 Sep 2011 14:18:04 +0200 (CEST)
From: Jim Meyering <jim@HIDDEN>
To: Eli the Beareded <gnu-bugs@HIDDEN>, 9370 <at> debbugs.gnu.org
Subject: Re: bug#9370: "tail -f -1" should work
In-Reply-To: <4E56990D.3040204@HIDDEN> (Paul Eggert's message of "Thu, 25
	Aug 2011 11:48:45 -0700")
References: <20110825061539.7FBF224251@HIDDEN>
	<4E56990D.3040204@HIDDEN>
Date: Tue, 13 Sep 2011 14:18:03 +0200
Message-ID: <878vps63gk.fsf@HIDDEN>
Lines: 20
MIME-Version: 1.0
Content-Type: text/plain
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25
X-Spam-Score: -10.5 (----------)
X-Debbugs-Envelope-To: 9370
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -10.5 (----------)

tags 9370 notabug wishlist
thanks

Paul Eggert wrote:
> On 08/24/11 23:15, Eli the Beareded wrote:
>> On any other system I have used the -NUM option can be used with
>> the -f option to specify how many lines of the file as-is to print
>> before starting to follow it for updates.
>
> The interaction between -NUM and other options is so complicated
> and unportable (different editions of the POSIX standards
> disagree!) that GNU 'tail' is fairly conservative about where it
> allows -NUM.  It might be nice to add support for your particular usage,
> if someone wants to write the code, but it'll require some care to make
> sure it doesn't run afoul of existing usage or standard in some other way.
>
> In the meantime I suggest using "tail -f -n NUM", as that's standard
> and portable these days.

I've marked this as a wishlist item.




Information forwarded to owner <at> debbugs.gnu.org, bug-coreutils@HIDDEN:
bug#9370; Package coreutils. Full text available.

Message received at 9370 <at> debbugs.gnu.org:


Received: (at 9370) by debbugs.gnu.org; 25 Aug 2011 18:51:38 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Aug 25 14:51:38 2011
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Qwf1d-0007Zh-4E
	for submit <at> debbugs.gnu.org; Thu, 25 Aug 2011 14:51:38 -0400
Received: from smtp.cs.ucla.edu ([131.179.128.62])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <eggert@HIDDEN>) id 1Qwf1Y-0007ZV-JX
	for 9370 <at> debbugs.gnu.org; Thu, 25 Aug 2011 14:51:33 -0400
Received: from localhost (localhost.localdomain [127.0.0.1])
	by smtp.cs.ucla.edu (Postfix) with ESMTP id 3F66739E80F2;
	Thu, 25 Aug 2011 11:48:51 -0700 (PDT)
X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu
Received: from smtp.cs.ucla.edu ([127.0.0.1])
	by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id Vo7NX5SjcQaX; Thu, 25 Aug 2011 11:48:50 -0700 (PDT)
Received: from [192.168.1.10] (pool-71-189-109-235.lsanca.fios.verizon.net
	[71.189.109.235])
	by smtp.cs.ucla.edu (Postfix) with ESMTPSA id D705439E80CF;
	Thu, 25 Aug 2011 11:48:50 -0700 (PDT)
Message-ID: <4E56990D.3040204@HIDDEN>
Date: Thu, 25 Aug 2011 11:48:45 -0700
From: Paul Eggert <eggert@HIDDEN>
Organization: UCLA Computer Science Department
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US;
	rv:1.9.2.18) Gecko/20110617 Thunderbird/3.1.11
MIME-Version: 1.0
To: Eli the Beareded <gnu-bugs@HIDDEN>
Subject: Re: bug#9370: "tail -f -1" should work
References: <20110825061539.7FBF224251@HIDDEN>
In-Reply-To: <20110825061539.7FBF224251@HIDDEN>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Spam-Score: -3.0 (---)
X-Debbugs-Envelope-To: 9370
Cc: 9370 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -3.0 (---)

On 08/24/11 23:15, Eli the Beareded wrote:
> On any other system I have used the -NUM option can be used with
> the -f option to specify how many lines of the file as-is to print
> before starting to follow it for updates.

The interaction between -NUM and other options is so complicated
and unportable (different editions of the POSIX standards
disagree!) that GNU 'tail' is fairly conservative about where it
allows -NUM.  It might be nice to add support for your particular usage,
if someone wants to write the code, but it'll require some care to make
sure it doesn't run afoul of existing usage or standard in some other way.

In the meantime I suggest using "tail -f -n NUM", as that's standard
and portable these days.




Information forwarded to owner <at> debbugs.gnu.org, bug-coreutils@HIDDEN:
bug#9370; Package coreutils. Full text available.

Message received at 9370 <at> debbugs.gnu.org:


Received: (at 9370) by debbugs.gnu.org; 25 Aug 2011 14:23:54 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Aug 25 10:23:54 2011
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1QwaqX-00064e-No
	for submit <at> debbugs.gnu.org; Thu, 25 Aug 2011 10:23:53 -0400
Received: from senmx12-mx.siemens-enterprise.com ([62.134.46.10])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <bernhard.voelker@HIDDEN>)
	id 1QwaqU-00064V-KZ
	for 9370 <at> debbugs.gnu.org; Thu, 25 Aug 2011 10:23:51 -0400
Received: from MCHP063A.global-ad.net (unknown [172.29.37.61])
	by senmx12-mx.siemens-enterprise.com (Server) with ESMTP id
	5778923F06BC; Thu, 25 Aug 2011 16:21:10 +0200 (CEST)
Received: from MCHP058A.global-ad.net ([172.29.37.55]) by
	MCHP063A.global-ad.net ([172.29.37.61]) with mapi;
	Thu, 25 Aug 2011 16:21:10 +0200
From: "Voelker, Bernhard" <bernhard.voelker@HIDDEN>
To: Eli the Beareded <gnu-bugs@HIDDEN>, "9370 <at> debbugs.gnu.org"
	<9370 <at> debbugs.gnu.org>
Date: Thu, 25 Aug 2011 16:21:03 +0200
Subject: RE: bug#9370: "tail -f -1" should work
Thread-Topic: bug#9370: "tail -f -1" should work
Thread-Index: AcxjLgUm1i6KJPmLS6S+NITNFGdPpQAArn0A
Message-ID: <7856072A9D04C24B82DFE2B1112FE38A0C27491ECE@HIDDEN>
References: <20110825061539.7FBF224251@HIDDEN>
In-Reply-To: <20110825061539.7FBF224251@HIDDEN>
Accept-Language: de-DE, en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
acceptlanguage: de-DE, en-US
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-Spam-Score: -3.3 (---)
X-Debbugs-Envelope-To: 9370
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -3.3 (---)

Eli the Beareded wrote:
> $ tail -f -1 some.log
> tail: option used in invalid context -- 1
> $

I think you wanted this:
$ tail -f -n1 some.log

The syntax is explained quite nice in recent versions:

    -n, --lines=3DK            output the last K lines, instead of the last=
 10;
                             or use -n +K to output lines starting with the=
 Kth
  ...
  If the first character of K (the number of bytes or lines) is a `+',
  print beginning with the Kth item from the start of each file, otherwise,
  print the last K items in the file.  K may have a multiplier suffix: ...

Have fun,
Berny





Information forwarded to owner <at> debbugs.gnu.org, bug-coreutils@HIDDEN:
bug#9370; Package coreutils. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 25 Aug 2011 06:21:03 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Aug 25 02:21:03 2011
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1QwTJG-0006qL-V9
	for submit <at> debbugs.gnu.org; Thu, 25 Aug 2011 02:21:03 -0400
Received: from eggs.gnu.org ([140.186.70.92])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <eli@HIDDEN>) id 1QwTGf-0006mN-U7
	for submit <at> debbugs.gnu.org; Thu, 25 Aug 2011 02:18:22 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eli@HIDDEN>) id 1QwTE6-0006wk-Up
	for submit <at> debbugs.gnu.org; Thu, 25 Aug 2011 02:15:44 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW,
	RP_MATCHES_RCVD autolearn=unavailable version=3.3.1
Received: from lists.gnu.org ([140.186.70.17]:35378)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eli@HIDDEN>) id 1QwTE6-0006wg-TJ
	for submit <at> debbugs.gnu.org; Thu, 25 Aug 2011 02:15:42 -0400
Received: from eggs.gnu.org ([140.186.70.92]:38826)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eli@HIDDEN>) id 1QwTE5-0006rm-S5
	for bug-coreutils@HIDDEN; Thu, 25 Aug 2011 02:15:42 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eli@HIDDEN>) id 1QwTE4-0006wM-KL
	for bug-coreutils@HIDDEN; Thu, 25 Aug 2011 02:15:41 -0400
Received: from mailbackend.panix.com ([166.84.1.89]:41582)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eli@HIDDEN>) id 1QwTE4-0006wI-IZ
	for bug-coreutils@HIDDEN; Thu, 25 Aug 2011 02:15:40 -0400
Received: from panix5.panix.com (panix5.panix.com [166.84.1.5])
	by mailbackend.panix.com (Postfix) with ESMTP id 9B4453459F
	for <bug-coreutils@HIDDEN>; Thu, 25 Aug 2011 02:15:39 -0400 (EDT)
Received: by panix5.panix.com (Postfix, from userid 13785)
	id 7FBF224251; Thu, 25 Aug 2011 02:15:39 -0400 (EDT)
To: bug-coreutils@HIDDEN
Subject: "tail -f -1" should work
From: Eli the Beareded <gnu-bugs@HIDDEN>
Organization: Some absurd concept
Message-Id: <20110825061539.7FBF224251@HIDDEN>
Date: Thu, 25 Aug 2011 02:15:39 -0400 (EDT)
X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta)
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 140.186.70.17
X-Spam-Score: -5.9 (-----)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Thu, 25 Aug 2011 02:21:01 -0400
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -5.9 (-----)

$ tail --version
tail (GNU coreutils) 8.5
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Paul Rubin, David MacKenzie, Ian Lance Taylor,
and Jim Meyering.
$
$ tail -f -1 some.log
tail: option used in invalid context -- 1
$

On any other system I have used the -NUM option can be used with
the -f option to specify how many lines of the file as-is to print
before starting to follow it for updates.

With this version of tail, it always prints ten lines and then
starts the follow.

Elijah




Acknowledgement sent to Eli the Beareded <gnu-bugs@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-coreutils@HIDDEN. Full text available.
Report forwarded to owner <at> debbugs.gnu.org, bug-coreutils@HIDDEN:
bug#9370; Package coreutils. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Fri, 31 Oct 2014 17:00:04 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.