From 2c789950db2777cac6d87de9312405b804a9025c Mon Sep 17 00:00:00 2001 From: Steve Stodola Date: Thu, 23 Nov 2017 17:16:08 -0700 Subject: [PATCH 1/3] update tail to indicate -F If I open the file with tail like this: $ tail -f /var/log/messages ... and if the log rotation facility on my machine decides to rotate that log file while I'm watching messages being written to it ("rotate" means delete or move to another location etc.), the output that I see will just stop. If I open the file with tail like this: $ tail -F /var/log/messages ... and again, the file is rotated, the output would continue to flow in my console because tail would reopen the file as soon as it became available again, i.e. when the program(s) writing to the log started writing to the new /var/log/messages. --- pages/common/tail.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pages/common/tail.md b/pages/common/tail.md index 596ee96b3a..b539686b56 100644 --- a/pages/common/tail.md +++ b/pages/common/tail.md @@ -17,3 +17,8 @@ - Keep reading file until `Ctrl + C`: `tail -f {{file}}` + +- Keep reading file until `Ctrl + C` even if the file is rotated: + +`tail -F {{file}}` + From 5174bb40f6cc4dee0e08c23d6d40cc022ebe04d9 Mon Sep 17 00:00:00 2001 From: Steve Stodola Date: Thu, 23 Nov 2017 22:53:55 -0700 Subject: [PATCH 2/3] Update tail.md --- pages/common/tail.md | 1 - 1 file changed, 1 deletion(-) diff --git a/pages/common/tail.md b/pages/common/tail.md index b539686b56..ea72b979ad 100644 --- a/pages/common/tail.md +++ b/pages/common/tail.md @@ -21,4 +21,3 @@ - Keep reading file until `Ctrl + C` even if the file is rotated: `tail -F {{file}}` - From 29612adca2f2f57d6a2fcf372fd2c322b55f8a15 Mon Sep 17 00:00:00 2001 From: Agniva De Sarker Date: Fri, 24 Nov 2017 11:41:53 +0530 Subject: [PATCH 3/3] add a comma --- pages/common/tail.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/common/tail.md b/pages/common/tail.md index ea72b979ad..1c6f82aee9 100644 --- a/pages/common/tail.md +++ b/pages/common/tail.md @@ -18,6 +18,6 @@ `tail -f {{file}}` -- Keep reading file until `Ctrl + C` even if the file is rotated: +- Keep reading file until `Ctrl + C`, even if the file is rotated: `tail -F {{file}}`