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

Previous Next

Package: coreutils;

Reported by: Eli the Beareded <gnu-bugs <at> panix.com>

Date: Thu, 25 Aug 2011 06:22:01 UTC

Severity: wishlist

Full log


Message #8 received at 9370 <at> debbugs.gnu.org (full text, mbox):

From: "Voelker, Bernhard" <bernhard.voelker <at> siemens-enterprise.com>
To: Eli the Beareded <gnu-bugs <at> panix.com>, "9370 <at> debbugs.gnu.org"
	<9370 <at> debbugs.gnu.org>
Subject: RE: bug#9370: "tail -f -1" should work
Date: Thu, 25 Aug 2011 16:21:03 +0200
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=K            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





This bug report was last modified 13 years and 279 days ago.

Previous Next


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