The chdir command is used for changing from one directory to another. The command has a shorter form cd which is used more often. There are two ways to specify the directory you wish to change to:
An absolute path that doesn't really look like it's absolute is any path that begins with '~/'. The'~' character is the complete path from the root directory to your home directory. This form is very useful when you wish to ascend from deep within your directory tree, but you don't want to type an absolute path from the root. It is also useful when you are elsewhere in the system and you wish to read or write files to one of your subdirectories.
cd pascal/lib
The lack of a preceding `/' character before the pascal directory name means that the path is relative to (below) the current directory. To move up in a directory tree, use ''..''. Every UNIX directory has a file named ''..'' in it, which refers to the parent directory. Thus to move to the directory right above your current directory, issue:
cd ..
To move up two directory levels issue:
cd ../../
Using ''..'' you can ascend to the parent directory, then descend into another child directory with one statement. If your current directory were /sulu/c++/lib, then issuing:
cd ../bin
would make your current directory /sulu/c++/bin