Directory Manager (dm)

dm is a small tool for managing often-visited directories using a shell like bash.

I offer two new commands: dm is a manager for a small database, where you name directories with a short alias. And dmcd is a function for your current shell, which lets you go to a directory given its alias in the database.

Example of use

$ dm 1 /tmp   # Adds the id '1' for /tmp
$ dm bla .    # Adds the id 'bla' for the current dir
$ dmcd 1      # Goes to /tmp
$ dmcd bla    # Goes to what was your current dir
$ dm -d bla   # Deletes the entry for 'bla'.
$ dm          # Shows your 'database'
1     /tmp
$ dm -h       # Shows help, and defines 'dmcd' for sh.

Download and installation

Download the latest version (GPL licensed): dm - v0.9 (The manual is in the header of the file). It's a script in bash - don't look for any special filename extension. Put the downloaded dm in your path.

Install the dmcd function. dm -h may give you a clue. For instance, for bash, add the following line into your .bashrc or .bash_profile (or any system wide script for each session):

function dmcd { dm -t $1 && cd `dm $1`; }
Author: LluĂ­s Batlle i Rossell, viric_at_vicerveza_dot_homeunix_dot_net