You don't have to do that.
http://www.howtogeek.com/howto/ubuntu/a-live-view-of-a-logfile-on-linux/
instead, just use
tail -f /path/to/thelogfile.log ,
which gives you a live view of your log file.
===============
edit: I've been using this for awhile now and just today I was having issues with wanting to search through the log without leaving the tail -f call. The solution to that is listed here:
http://www.brianstorti.com/stop-using-tail/
Basically, you can use the same "follow" capability in Unix "less" if you only need to follow one file.
less +F /path/to/thelogfile.log
The cool thing here is that you can use vi navigation and search commands to get around quickly.
Also, it's fairly common that I've been using vim to look at files that I don't want to alter. It might make more sense to just start out with less.
No comments:
Post a Comment