Stop using tail -f (mostly)
41–50 of 211 posts
Re: Stop using tail -f (mostly)
#42Or just tail -f in an emacs buffer
You can also open the file and engage auto-revert-mode or auto-revert-mode-tail. In my status bar it shows up as ARev mode.
Also you can bind those to your auto-mode-alist so all .log files get the tail treatment or whatever.
Scrolling can get weird.
Theres some google-able settings for the timeout to revert, default is about a sip of water (a few seconds?) but I guess you could crank it down to 1 second or something.
I like doing this in emacs so its all in the same ecosystem, if I need to cut and paste something weird to test it or put the message into code or even more likely to cut and paste actual error messages into docs or comments, I can do it inside emacs.
Re: Stop using tail -f (mostly)
#43/thefox
Re: Stop using tail -f (mostly)
#44 journalctl -u service-name -f
-f, --follow
Show only the most recent journal entries, and continuously print new entries as they are appended to the journal.Re: Stop using tail -f (mostly)
#45Many of the comments I see on here about using '-F' with tail instead of '-f', live searching, and so on are handled in lnav by default. I would really encourage folks to give it a try.
Re: Stop using tail -f (mostly)
#46A much nicer alternative, IMHO.
Re: Stop using tail -f (mostly)
#47Of course I'll probably fail to use any of it because of finger memory just typing out tail -f for me.
Re: Stop using tail -f (mostly)
#48Re: Stop using tail -f (mostly)
#49On current Linux distros, you're more likely to use: journalctl -u service-name -f -f, --follow Show only the most recent journal entries, and continuously print new entries as they are appended to the journal.
journalctl -fu service-name