I was introduced to less +F a while ago and it is quite nice, but there is one simple "feature" of tail -f that I miss quite a lot: being able 'mark' the log with gaps by hitting enter a few times. This is especially handy when you have to first load a page or warm up the app before performing the operation you're interested in watching, letting you separate the earlier output from the lines generated by what you're…
Stop using tail -f (mostly)
21–30 of 211 posts
Re: Stop using tail -f (mostly)
#22It's a nice feature of less, but less is a pager, so you can't pipe the result to `grep` or `sed` or `awk` or something.
Re: Stop using tail -f (mostly)
#23I 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.
That only works if you only care about search results since you started tailing. If you want to search for what happened before you started tailing, you need to stop tailing and use less/grep/etc.
Re: Stop using tail -f (mostly)
#24Re: Stop using tail -f (mostly)
#25Re: Stop using tail -f (mostly)
#26Re: Stop using tail -f (mostly)
#27Re: Stop using tail -f (mostly)
#28I was introduced to less +F a while ago and it is quite nice, but there is one simple "feature" of tail -f that I miss quite a lot: being able 'mark' the log with gaps by hitting enter a few times. This is especially handy when you have to first load a page or warm up the app before performing the operation you're interested in watching, letting you separate the earlier output from the lines generated by what you're…
With less, you can use m to mark the current position and ' to go to a marked position. h will show you lots of useful help.
Re: Stop using tail -f (mostly)
#29Re: Stop using tail -f (mostly)
#30Or use multitail. It supports syntax highlighting, among other features: http://www.vanheusden.com/multitail/
multitail is great. I really cannot use command line utils that don't support colors/highlighting anymore. htop instead of top, etc. It just gives me much better visibility and readability. I'm surprised that so many non-color utils are still being used. It just feels so 1994 to me to stare at a white on black display. I guess there's nothing more slow moving and conservative than shell interfaces, thus articles like…
For example: tail -F somefile.log|ccze -A
For your shell, there's a lot of funky colorful interactive customizations you can get on zsh and fishfish.