online at
twitter
Tumblr
LinkedIn
BlipFM
Vimeo
yelp
facebook

Archive for September, 2009

Walking in the Rain
Sunday, September 27th, 2009

Creating an Alias in Terminal on Mac OSX 10.5
Wednesday, September 16th, 2009

This is a cool way to quickly execute commonly used commands in shell. In this particular example, I show you how to quickly navigate to a commonly used folder.

Make sure you are in your root directory./Users/yourUsername

Create a file called .profile. I prefer to use vi for this purpose.

$ vi .profile

If you’re new to vi, here are the basic commands you will need to remember for this task.

* : x [return] to close and save the file
* i to insert text before the cursor until you press [esc]

More basic vi commands

Now it’s time to create the alias, type in the following into your new file,

alias yourLabel=”/path/to/commonly/”Used Directory”

Close and save the file. Now, make sure to restart Terminal, or the changes will not be reflected. Once you have restarted Terminal, simply type in the alias …

$ yourLabel

… and voila!