Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Launchy is a great piece of software, I use it on Windows mainly for quickly accessing folders. I love its auto-indexing in the background, and hardly ever browse through folders manually these days, solves me lots of time.

On Linux (Ubuntu 9.10), I usually "live" in the terminal, however. Therefore, Launchy on Linux (or Gnome Do, or its other replacements) are not what I need - as it opens the file manager, and I don't need the file manager.

What I do need is something that indexes my folders and lets me cd into them quickly in the terminal. For example:

mycd python_c

Will cd to:


I hope my intention is understood :-)

Are you familiar with such tools?

share|improve this question

Bash has the CDPATH variable.

$ CDPATH="$CDPATH:~/dev/scripts/:/some/other/one/too"
$ cd python_code
$ pwd

You could script the maintenance of the value something like this:

In your ~/.bashrc:

cd() {
    while read -r dir
        if [[ ! $CDPATH =~ $dir ]]
    done < ~/.cdpath
    builtin cd "$@"
cd .    # update CDPATH
export CDPATH

In a file called /usr/local/bin/mkcdpath:

# update the stored CDPATH directory list
# run from cron, can be run manually
# requires Bash >= 3.2
while read -r dir
    if [[ ! $cdp =~ $dir ]]
done < <(find /anchored_at_root -maxdepth 1 some_find_args  -type d)
echo "$cdp" > ~/.cdpath

Run that periodically using cron.

Now anytime you use cd, it will update the current shell's CDPATH and perform the directory change according to it (in addition to doing normal cds which are tried first). You could change the function name (and remove the cd command) to make it an update function only and use the regular cd command - it just wouldn't update the value automatically.

share|improve this answer

You might be interested in some advanced feature of zsh. It add some extra shortcuts to cd.

share|improve this answer
up vote 0 down vote accepted

Just want to write down that after some looking around I've found z - it learns the directories you CD into and then lets you easily jump into them.

There's also autojump, but z appears to be closer to what I need.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.