Wednesday, May 23, 2007

Quick tip on command line short cut in OS X

How many times you’ve type “ssh www.mywebsite.com -l username -p 23423″? want to simplify that?

Here is how you can simplify your shell command:

1. go to shell, type : vi ~/.bash_profile

2. in the following vi editor window, press “a” to switch to insertion mode.

3. put in your short cut command line by line: example: alias sshmyweb=’ssh www.mywebsite.com -l username -p 23423′

4. finish and save your shortcut config by press “ESC” in vim window, then type “:wq”, press enter.

start a new shell window, type in “sshmyweb” and see the magic

this post is originated at Justin's personal blog (click here to see the original post and many others)

1 Comments:

Anonymous Anonymous said...

Well written article.

4:18 PM  

Post a Comment

<< Home