Stop using tail -f (mostly)
brianstorti.com
Stop using tail -f (mostly)
1–10 of 211 posts
Re: Stop using tail -f (mostly)
#2Re: Stop using tail -f (mostly)
#3Re: Stop using tail -f (mostly)
#4Re: Stop using tail -f (mostly)
#5Re: Stop using tail -f (mostly)
#6Re: Stop using tail -f (mostly)
#7tail works best for me. I'm not going stop using it just because a person on the internet says not to.
Re: Stop using tail -f (mostly)
#8The downside: less buffers and tail -f prints directly. On a slow printing log this can cause events to show up slowly, and can cause performance issues on a fast moving log. If you're piping through a script for processing, tail -f is still the best bet. If you need multiple files, multitail is probably better. less +F hits a quick+easy operational niche and is available almost everywhere (whereas multitail is not).
Re: Stop using tail -f (mostly)
#9 --retry
keep trying to open a file even if it is inaccessible when tail
starts or if it becomes inaccessible later; useful when follow-
ing by name, i.e., with --follow=name
-F same as --follow=name --retryRe: Stop using tail -f (mostly)
#10I use tail -f and when I need to search, I use iTerm's search (Cmd+F) which highlights matches and even supports regex. I also have an unlimited scroll buffer so I can just scroll up or down to get the context of a particular match.