Thursday, February 27, 2014

screen utility

Love using screen term its very very handy for development purpose, it has so many functions, even i'm not an expert in all of  thme.

Here are few things that are handy for daily usage:




Copy and Paste from screen buffer:
1) use  end of copy

2) To paste C + p ]


Search keyword in buffer
/SearchWord - Vi-like search forward.
?SearchWord - Vi-like search backward.
Still to come... 

Execute a command in remote PC

I want to patch a file in remote m/c and was trying to use ssh command, didn't know it was so easy ;)

Basics:
To execute a command in remote m/c
ssh user@ip

To execute multiple commands in remote m/c
ssh user@ip  'command | command'

To execute a local script in remote pc
ssh user@ip  'command' <  local_script

My command:
ssh user@ip 'patch -p0 --dry-run -d ' < patch_file.patch


More info from this link