Quick Tip: Easily access development folder

Nick Schmidt
Quick Tips: Development
1 min readDec 9, 2014

I recently found a way to easily access my development folder, when working with Terminal. Now I wanted to share it with you.

When you start a new Terminal session, you are in your users root folder, right? Now lets say your development folder is in ~/Documents/Sites. Just imagine you need to type this every time you open a new Terminal window:

$ cd ~/Documents/Sites

It’s very time intensive, when typing this every time again and again. Now there is a easy way to avoid this.

First, you need to create a Symlink using Terminal like this:

$ ln -s ~/Documents/Sites ~/d

Now you have a Symlink in your users home folder that’s called ~/d. Next, you need to hide this Symlink using the following command:

$ chflags -h hidden <symlink>

After this is finished, you have an invisible Symlink that is easily accessible through Terminal.app, but not visible in Finder.app.

Easy, huh? Now it’s just not more than this:

$ cd ~/d

or just

$ cd d

Thanks for reading one of my Quick Tips!

As Zack figured out on DesignerNews, there is a much more simple (if you know bash) method. You just need to add the following to your config:

cd() {
if [[ $1 == "d" ]]; then
command cd ~/Documents/Sites;
elif [[ $1 == "f" ]]; then
command cd ~/fresh/as;
else
command cd "$@";
fi;
}

--

--