Boston University
Mathematics and Statistics
Mathematics and Statistics
Overview People Courses Programs of Study Seminars Special Programs Events Research Jobs
Mathematics and Statistics
 
next up previous contents
Next: File Permissions Up: Introduction to UNIX Previous: The Concept of
 

Information about Files and Directories

To see the full path to your current working directory, use the pwd command. For Example:
math joe % pwd
/home/grads/joe
math joe %

The prompt you see is also an indication of where your current working directory is located. It prints the hostname followed by the name of your current working directory. It changes as you move around the file system.

Note: This prompt is not a standard feature of UNIX. By default your prompt would be unchanged throughout your session. We have set up your account to enable your prompt to reflect the name of your current working directory.

The ls command will show you the names of files in your current working directory. For example:
math joe % ls
RMAIL thesis
math joe %

In this example there are two files or directories (we don't know which at this point) in Joe's current working directory. They are named RMAIL and thesis.

File names in UNIX have no ``standard'' format. In the example above, there is one file name in all upper-case letters and another in all lower-case letters. File names can have any combination of letters, including upper-case, lower-case, numerals, dashes, or dots. File names can also be quite large or quite small.

There are many options to the ls command which will be discussed in other sections of this document.

To change your current working directory to be another directory, use the cd <directory> command. For example, if Joe wants to change from his home directory to his thesis directory, he could use the command:
math joe % cd thesis
math thesis %
or
math joe % cd /home/grads/joe/thesis
math thesis %

Notice how the UNIX prompt changes to reflect the name of the current working directory.



next up previous contents
Next: File Permissions Up: Introduction to UNIX Previous: The Concept of



Tim Kohl
 
September 2004
Mathematics and Statistics
Boston University