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.
coverage
Steve Stodola 2017-11-23 17:16:08 -07:00 committed by GitHub
parent 6c391a1192
commit 2c789950db
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -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}}`