Watch Multiple Logs in a Single Terminal
Have you ever opened 4 terminal windows, SSHed each one into a server, and ran tail on all of them to watch 4 log files?
Have you ever had a terminal window open whose sole purpose was to run "tail my_log" over and over again to look at the output of a file?
It's a pain, isn't it?
Introducing "Watch Me" a simple ruby script that allows you to watch multiple log files simultaneously.
go from this:
to this:
First, get Watch Me from github.
Then, try out the example by following these instructions:
- Open 3 terminal windows in the watch_me directory
- In the first terminal, run:
$ ./examples/rander.rb > rander.1.log - In the second terminal, run:
$ ./examples/rander.rb > rander.2.log - In the third terminal, run:
$ ./watch_me.rb rander.1.log rander.2.log
You can customize the behavior with the "r" and "l" flags.
./watch_me.rb -l 60 -r 1 file1 file2
Will use 60 terminal lines and refresh every 1 second. This lets you see even more of your files, and see it in near real-time.
Enjoy.