Is there a way to go to any directory from any other directory directly?
You can use something like autojump. Autojump lets you quickly jump to frequently visited directories with the j
command.
For instance, once you've cd
'd into your currentProject
directory a few times, you can jump to it like this:
j currentProject
You can even use just part of the directory name. So you could do:
j current
To cd
into currentProject
.
You can also add some common directories to your $CDPATH
export CDPATH=$HOME
This for example will let you cd
into any dir in your home folder from anywhere in your system.
more
This doesn't answer your question directly, but if I'm inferring correctly that you're going to be jumping between directories a lot, you could use a terminal multiplexer like GNU Screen to keep the different directories open in different windows, and simply switch between them as needed. I personally use Byobu, which adds some functionality on top of screen.
You can set an alias in your bash profile. Basically that lets you abbreviate a command with a word. You could set currentProject actually point to /dropbox/dev/currentProject
You could create symlinks in your home directory to where you want to go.
ln -s /dropbox/dev/currentProject ~/currentProject
This way, you're still using cd, but you don't have to remember the full path. Just use:
cd ~/currentProject
When you stop using the link, just delete it.
rm ~/currentProject