If you need to move back a directory ( parent directory), you can use the following command. In the example below, the command would move into the cgi-bin directory, which is in the public_html directory. If you need to move into a subdirectory with one command, you can use a command similar to the example below.
The example below changes into the public_html directory. Once you know the directory is available, type a command similar to the command below. See the ls command page for further information and examples of this command. For example, type the following command to only list directories in the current directory. Below are some basic examples of how this command can change directories.īefore changing directories, you need to know what directories are available in the current directory. To change directories while in a *nix environment, use the cd command.
To change directories while in MS-DOS or the Windows command line, use the cd command. Microsoft Windows users can also change directories at the Windows command line (MS-DOS) as explained below.