summaryrefslogtreecommitdiff
path: root/src/tail.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2001-09-12 07:27:29 +0000
committerJim Meyering <jim@meyering.net>2001-09-12 07:27:29 +0000
commit388c1a6104affbeed3a5244ec1c454efd9180f96 (patch)
tree8c8abd1927c10833a6adfc2d595bdef59868bf38 /src/tail.c
parent484ce2d8de1a493b10aa5c6c16d18a22f6747f0d (diff)
downloadcoreutils-388c1a6104affbeed3a5244ec1c454efd9180f96.tar.xz
tail: accept new option: -F, equivalent to `--follow=name --retry',
for compatibility with FreeBSD and NetBSD versions of tail. (usage): Describe new option. (parse_options): Accept it.
Diffstat (limited to 'src/tail.c')
-rw-r--r--src/tail.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/tail.c b/src/tail.c
index 99ac4e96c..edaf09fa4 100644
--- a/src/tail.c
+++ b/src/tail.c
@@ -250,6 +250,7 @@ With no FILE, or when FILE is -, read standard input.\n\
output appended data as the file grows;\n\
-f, --follow, and --follow=descriptor are\n\
equivalent\n\
+ -F same as --follow=name --retry\n\
-n, --lines=N output the last N lines, instead of the last %d\n\
--max-unchanged-stats=N\n\
with --follow=name, reopen a FILE which has not\n\
@@ -1365,7 +1366,7 @@ parse_options (int argc, char **argv,
count_lines = 1;
forever = from_start = print_headers = 0;
- while ((c = getopt_long (argc, argv, "c:n:fqs:v", long_options, NULL))
+ while ((c = getopt_long (argc, argv, "c:n:fFqs:v", long_options, NULL))
!= -1)
{
switch (c)
@@ -1373,6 +1374,11 @@ parse_options (int argc, char **argv,
case 0:
break;
+ case 'F':
+ forever = 1;
+ follow_mode = Follow_name;
+ reopen_inaccessible_files = 1;
+
case 'c':
case 'n':
count_lines = (c == 'n');