|
Department of Geography Computer Labs |
|
Windows and Unix/Linux File and Directory Structure UNIX/Linux and Microsoft Windows XP have similar file structures, that is, the way files and directories are organized on a hard disk. They implement a tree-structure, or hierarchial, file system. A directory can contain any number of files. A directory can also contain other directories. UNIX file structure:
A pathname is the notation used to point to a particular file or directory; it tells you the path of directories you must travel to get where you want to go. There are two types of pathnames: absolute and relative. An absolute pathname always starts from the root directory, which is
indicated by a slash (/). So, for example, the pathname for
the file quiz1.doc is:
/data/moon/array2/aa/tbw/courses/G130/quizzes/quiz1.doc.
A relative pathname points to a file or directory relative to your current working directory. Unless you specify an absolute pathname (starting with a slash) the shell assumes you are using a relative pathname. Starting in your current location (your working directory), you can trace your way up and down the directory hierarchy. Microsoft Windows file structure: Samba is the software that allows Microsoft Windows XP (with its file structure) store and access files on moon, the Department's Unix file server. Samba and our Windows XP network environment are configured so that when you log onto any Windows PC in the Department, your Unix home directory on moon is automatically mapped as the U: drive. If user tbw logs onto a Windows PC and opens Windows Explorer he can go to his U: drive and see all of the files in his home directory that are stored on moon, the Department's file server. For example, according to the file structure in the diagram on the web page, there are four directories in the tbw home directory (courses, memos, data and todo). Clicking on the U: drive in Windows Explorer would show those four directories. User tbw could also look at those same directories by using the SSH program on the PC to log onto the Linux computer called earth and then typing the Unix/Linux command "ls -a". The four directories (courses, memos, data and todo) would be displayed as well as some other files and directories to be discussed later. |