SIMS File Services Tutorial 1. Filesystems  

Most commonly used operating systems use the same basic scheme for organizing data. Information, including user data, programs, etc. is placed in files. The files, in turn, are stored in directories (often referred to as folders). Directories are organized into a hierarchical structure resembling an upside down tree. This entire structure, including all of the directories and files, as well as the special structures the operating system uses to keep track of them, is called a filesystem. A simplified UNIX filesystem is shown in the Figure 1.1.

Figure 1.1   A UNIX filesystem.

At the top of the tree (remember the tree is upside down in our analogy) is a special directory, called the root directory. In UNIX, this is represented by the "/" (slash) character. UNIX uses a "singly-rooted filesystem" in which all directories and files appear to be under a single tree, even if they are spread across several disks, and regardless of whether the disks are locally attached or mounted from another machine across the network. Windows uses a somewhat less elegant scheme in which "drive letters" are used to represent the various physical and logical drives. Each of these has a seprate root directory. For example, the root directory of the first hard drive is usually represented as "C:\".

As you use a computer, the operating system keeps track of your location within the filesystem. This is often referred to as the working directory or current directory.

The location of a file or directory within the filesystem is called a pathname, because it describes the path you must follow to find it. You can construct a pathname by starting at the root directory and working your way down. Each level in the hierarchy is separated by the "/" character in UNIX, or the "\" (backslash) character in Windows. For example, you will notice that there is a directory called "home" underneath the root directory in Figure 1.1, and underneath that is another directory called "natasha." The pathname for the natasha directory would be /home/natasha (the first "/" character represents the root directory; the second separates home from natasha). This type of pathname is called an absolute pathname because it starts from a fixed reference point, the root directory ("/"). A relative pathname, on the other hand, describes the location of a file in relation to the current working directory. If the current directory were /home, the relative pathname for accessing the natasha directory would simply be natasha.

An example of a pathname in Windows might be something like "C:\Program Files\eclipse\eclipse.ini".

In the following exercise, we will do some very rudimentary file management on the local disk (the "C: drive") using Windows Explorer ("My Computer"). The files created here will be used in later exercises.

Exercise 1

1.1 Launch Windows Explorer by clicking on "Start" and selecting "My Computer".
1.2 Navigate to C:\TEMP and create a folder called "test".
1.3 Navigate to C:\Program Files\eclipse. Look for the file called "eclipse.ini".

Note that unless you have changed your default settings, Windows Explorer (and other file navigation tools in Windows) will hide the filename extensions for certain types of files. If this is true, you may see a number of files just called "eclipse". To solve this problem, click on "Tools" and select "Folder Options." Select the "View" tab. Unselect "Hide file extensions for known file types." Click on "Apply." (If you want this view to apply to all folders, click on "Apply to All Folders.") Click on "OK" to close the dialog box.

Copy the file eclipse.ini to C:\TEMP\test. Do this by clicking with the right mouse button on eudora.ini and selecting "Copy" from the menu. Then navigate to C:\TEMP\test, right click anywhere in the blank space on the right representing the "test" folder, and select "Paste."


<   previous   |   next   >