[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

address@hidden: Bug#80541: [Patch] GNU tail does now support option -F/-

From: Herbert Xu
Subject: address@hidden: Bug#80541: [Patch] GNU tail does now support option -F/--follow-forever]
Date: Sat, 28 Apr 2001 16:31:27 +1000
User-agent: Mutt/1.3.15i

Full details are available at

In that thread, Christian Kurz also noted that FreeBSD's tail already
supports a -F option whose behaviour is almost identical to this proposed
option.  The same is true in NetBSD.
Debian GNU/Linux 2.2 is out! ( http://www.debian.org/ )
Email:  Herbert Xu ~{PmV>HI~} <address@hidden>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--- Begin Message --- Subject: Bug#80541: [Patch] GNU tail does now support option -F/--follow-forever Date: Tue, 26 Dec 2000 17:45:49 +0100
Package: textutils
Version: 2.0-3
Severity: wishlist


after the discussion on debian-devel about the behaviour of tail to endlessly
tail a logfile, Ethan Benson told me about the options --follow=name and
--retry to get this behaviour. As I'm a bit lazy and don't want to type this
long options regulary, I created a patch for tail to support -F and
--follow-forever to generate this behaviour. You will find this patch at the
end of the mail. I hope that you include it in our tail and send it also to the
upstream maintainers. Thanks.


-- System Information
Debian Release: woody
Architecture: i386
Kernel: Linux seteuid 2.4.0-test9 #1 Sun Oct 29 18:10:04 CET 2000 i586

Versions of packages textutils depends on:
ii  libc6                         2.2-6      GNU C Library: Shared libraries an

-- Patch:
diff -uNr textutils-2.0.old/src/tail.c textutils-2.0/src/tail.c
--- textutils-2.0.old/src/tail.c        Thu Aug  5 16:38:02 1999
+++ textutils-2.0/src/tail.c    Tue Dec 26 17:33:25 2000
@@ -187,6 +187,7 @@
   {"allow-missing", no_argument, NULL, CHAR_MAX + 1},
   {"bytes", required_argument, NULL, 'c'},
   {"follow", optional_argument, NULL, 'f'},
+  {"follow-forever", optional_argument, NULL, 'F'},
   {"lines", required_argument, NULL, 'n'},
   {"max-unchanged-stats", required_argument, NULL, CHAR_MAX + 2},
   {"max-consecutive-size-changes", required_argument, NULL, CHAR_MAX + 3},
@@ -1311,7 +1312,7 @@
   count_lines = 1;
   forever = from_start = print_headers = 0;
-  while ((c = getopt_long (argc, argv, "c:n:f::qs:v", long_options, NULL))
+  while ((c = getopt_long (argc, argv, "c:n:f:F::qs:v", long_options, NULL))
         != -1)
       switch (c)
@@ -1357,6 +1358,11 @@
            follow_mode = XARGMATCH ("--follow", optarg,
                                     follow_mode_string, follow_mode_map);
+       case 'F':
+         forever = 1;
+         follow_mode = Follow_name;
+         reopen_inaccessible_files =1;
        case CHAR_MAX + 1:
          reopen_inaccessible_files = 1;

--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]