Saturday, May 4, 2024
 Popular · Latest · Hot · Upcoming
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 2280  / 3 Years ago, sat, september 18, 2021, 3:47:27

I don't want to have to keep reloaded a log file manually, I want to automatically see my logs as they come in.



Apparently, VIM has this feature built in, something called autoread, but I can't get it to work in Ubuntu



I can run



sudo vi ~/.vimrc


to edit vim's config file like so:



 set number
set autoread


The number argument works perfectly. autoread doesn't work at all.



Any ideas or hacks? I want VIM to automatically scroll the bottom of the file when a file it's viewing is updated as well.


More From » vim

 Answers
4

The tail command does exactly what I want...does it a little better actually:



tail /var/logs/foo.log


That will automatically print of foo.log to the console, and, when foo.log is updated, this will be reflected in the console.


[#28463] Monday, September 20, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
torlim

Total Points: 408
Total Questions: 113
Total Answers: 110

Location: Estonia
Member since Wed, May 27, 2020
4 Years ago
;