Pencarian

Rss Posts

 

 

 

A cool terminal tip for Mac users

Mar 13, 2011

If you use a Mac, and you are dealing with many similar tasks at once, like examining many database servers in different terminals, you may like this one.I have been using iTerm 2 for a while, and my handling of parallel tasks has improved a lot. (No, I am not talking about Parallel replication, although I have applied this trick while testing that technology as well.)iTerm2 has some cool features, and probably the most striking one is split panes. That alone would be a good reason for giving iTerm2 a try. But the one that I use the most, often in combination with Split Panes, is called Send Input to all tabs.Here is how it works. Let’s say I need to use 4 servers at once, and perform a non-repeating operation in all of them.So I open a separate window and I split the screen into 5 panes. I connect to each server in the first four panes, and I open a vim instance in the fifth.With that done, I enable the magic option.A word of caution. This option sends the input to all the open tabs in your current window. If you don’t want this to happen, do as I do, and open a separate window. Then make sure that all tabs, and eventually split panes, are supposed to receive your input. The application asks you for confirmation.After that, whatever I type on one pane will be mirrored on all the panes. So I will see the commands running on my four servers, and being logged in a text file in the fifth one. All with just single command, I have all servers under control at once: