WebMail
WebMail

cd


CD

The cd commond allows you to navigate through directories.

Example #1 - Changing to your public_html directory.

lager 8:35pm {0}[~] cd public_html
lager 8:35pm {0}[/public_html]

There are several shortcut commands for use with the cd command.

You can use the cd .. (note the space between cd and the first period) command to go back one level in the directory tree.

Example #2 - To easily go the the parent directory of the current directory.

lager 8:35pm {0}[/public_html]cd ..
lager 8:35pm {0}[~]

Example #3 - Moving through multiple directories at once.

Suppose you have a directory called graphics in you public_html directory. To get to graphics from your home directory:

lager 8:35pm {0}[~]cd public_html/graphics
lager 8:35pm {0}[/public_html/graphics]

So you see that this allows you to go straight to the graphics directory without having to go through the public_html directory first. Similarly you can move more than just two directories at a time. Just keep putting / between directory names.

Example #4 - Moving backwards through multiple directories.

lager 8:35pm {0}[/public_html/graphics]cd ../..
lager 8:35pm {0}[~]

This brings you back two directories in the directory tree to your home directory.