cd /some/directory/
cd /another/directory/
cd /some/directory/
you can remember the command:
cd ~-
but it is more useful to have an alias defined in an aliases file (usually ~/.bash_aliases is easily sourced by your ~/.profile, or ~/.bashrc)
a few cd related aliases i tend to include:
alias ..='cd ../'
alias ...='cd ../../'
alias bd='cd ~-'
on a related note; there are other directory changing commands (other than cd) that are good to learn (and use for functions or aliases): popd, pushd, and dirs.
--
hope u find this useful...