From 2c789950db2777cac6d87de9312405b804a9025c Mon Sep 17 00:00:00 2001 From: Steve Stodola Date: Thu, 23 Nov 2017 17:16:08 -0700 Subject: [PATCH] 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}}` +