If you're using a modern terminal with scrollback, you already have the ability to pause, and scroll back. # tail -f busy.log ctrl+s # Stops flow of output. pgup/pgdn for navigation # fn+up/dn for OS X users ctrl+q # Continues flow. No need to reinvent the wheel, the functionality you want is probably built into the tools you're already using.
This is not a replacement for searching for a specific string in `less` which highlights the matches, and eliminates the need for scanning the text manually which is harder and prone to missing information.
Stop using tail -f (mostly)
61–70 of 211 posts
Re: Stop using tail -f (mostly)
#62If you're using a modern terminal with scrollback, you already have the ability to pause, and scroll back. # tail -f busy.log ctrl+s # Stops flow of output. pgup/pgdn for navigation # fn+up/dn for OS X users ctrl+q # Continues flow. No need to reinvent the wheel, the functionality you want is probably built into the tools you're already using.
This is not a replacement for searching for a specific string in `less` which highlights the matches, and eliminates the need for scanning the text manually which is harder and prone to missing information.
Re: Stop using tail -f (mostly)
#63Re: Stop using tail -f (mostly)
#64Linux just really needs PowerShell.
Re: Stop using tail -f (mostly)
#65Earlier quoted context omitted.
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…
Also take a look at ccze which is great for syntax-coloring all kinds of log files heuristically. 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.
Re: Stop using tail -f (mostly)
#66Earlier quoted context omitted.
Yeah, tail -F is the way to go imo. Also, if you are using a proper ssh client, opening a second ssh connection to manage the reacting to the log files is habit for me at this point. The only time I'm using tail -F is after a new configuration deployment. Otherwise, I'm looking at archival data in ELK.
Have you tried using screen[1]? Might make things a little easier than have two separate SSH connections. [1] https://www.gnu.org/software/screen/
Re: Stop using tail -f (mostly)
#67Earlier quoted context omitted.
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.
GP isn't meaning it like that, they mean being able to add some spaces so that the next log entries stand out for quick visual identification as you're making changes and reloading the application.
Re: Stop using tail -f (mostly)
#68Re: Stop using tail -f (mostly)
#69Re: Stop using tail -f (mostly)
#70Earlier quoted context omitted.
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.
An example of some of the vi commands that less(1) has adopted. You can also: * page forward and backward, including using numeric prefixes to indicate a lineno or indicate "repeat 'n' times". * launch vi if less(1) is working on a file (versus (eg) stdout of some process) * search fwd/backward * start examining a new file w/o leaving less(1) * ...
yank 10 lines, open a new file, paste the 10 lines, save the file.
Is that possible? My Googling last week didn't find a good solution.