Polaris: How do I Navigate Through Directories?
To move from one directory location to another on polaris, the cd (change directory) command is used. The syntax of the command would be to type cd followed by the directory or directory path you wish to move to. If you use cd without a directory name or directory path, you will be moved to your accounts home directory. Also note that you can specify ".." to change to the parent directory of your current directory. The pwd command displays your "present working directory" and will display your current location if typed at the polaris prompt. This is useful in moving around within your polaris account.
To see your current directory location, type pwd at the polaris prompt:
The example to the right shows a student assigned the userid of jsmith99 is currently located in /users/student/jsmith99 This would be the home directory for this students account.
In the example in step 1 above, the student is located in his home directory. If this student has a directory named project in his home directory and would like to move into the project directory, he would type the cd command followed by the name of the directory). If the project directory is located in a different location, he would need to type the full directory path.
polaris> cd project
Next, type the pwd command again to verify your location:
This shows a currently directory location now of /users/student/jsmith99/project
While located in the /users/student/jsmith99/project directory, the user can then move back to his home directory by typing cd at the polaris prompt:
In addition, while located in the project directory, the user can also use ".." to move to the parent directory of his current location (one directory level higher). In this example, the home directory would be the parent directory of the project directory.
polaris> cd ..
Note: the above command must contain the space between cd and the ending two periods.
If the ct385z99 user has a directory named final inside his project directory and is currently located in his accounts home directory, he would need to specify the path to the directory to move into it. In this case, the user would need to type project/final after the cd command to move inside the final directory:
polaris> cd project/final