Moving around Directories.
Change to the home directory:
$ cd ~
or
$ cd
To go back to the last directory
$ cd -
Instead of "cd" to a directory try "pushd" and look
at the heading...you can see a list of directories.
$ pushd /etc
$ pushd /usr/local
Then, to get back "popd" or "popd 1"
To list all the directories pushed on the stack
use the "dirs -v" command.
$ dirs -v
0 /usr/local
1 /etc
2 /work/souptonuts/documentation/theBook
Now, if you "pushd +1" you will be moved to "/etc", since
is number "1" on the stack, and this directory will become
"0".
$ pwd
/usr/local
$ pushd +1
$ pwd
/etc
$ dirs -v
0 /etc
1 /work/souptonuts/documentation/theBook
2 /usr/local