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: Information about Files Up: Introduction to UNIX Previous: Changing Your Password
 

The Concept of Files and Directories

The UNIX file system consists of many files and directories. They are organized in an inverted tree structure, which means that there is one directory at the top which contains all the other directories below it. The directory at the top is called the root of the file system and is represented by a slash, ``/'' (as opposed to the MS-DOS back slash, ``''). Each directory below the root is represented with names like /bin or /usr. Each level below adds another slash and another name. Each person is given their own directory when they get an account. This is where they can create and store their files. This directory is called the home directory. When a person logs into their account they are automatically placed in this home directory. There are lots of other directories in the UNIX file system, such as directories that contain software packages, operating system programs, system administration files, and other people's home directories. Below is a simplified diagram of the file system tree structure.
Joe's home directory is /home/grads/joe. When he logs in, he is placed in his home directory, and it is initially said to be his current working directory. This means that any files he accesses or creates will be in this directory unless he specifies another directory. For example, if he creates a new file called index it will be placed in /home/grads/joe/index. If he wanted to place it in his subdirectory called thesis, he would have to change his current working directory to be the thesis directory or prepend the path to the file name. He could refer to the file by its full name beginning from the root of the file system ( /home/grads/joe/thesis/index) or he could use a relative path name ( thesis/index).



next up previous contents
Next: Information about Files Up: Introduction to UNIX Previous: Changing Your Password



Tim Kohl
 
September 2004
Mathematics and Statistics
Boston University