Basic Files and Directories

This page along with the unix page is here inorder to help you better understand a computer filing system, particularly as it relates to unix. This information will make the assignments dealing with unix and the webpages alot easier. It is required knowledge. This can dramatically reduce the time it takes to do your webpage in the long run. It may also help you to keep from losing term papers!!

Disk Drives, usually labeled in Windows/Dos systems as A: through Z: though in Unix they don't really exist the same way. Analagous to drawers in a filing cabinet.

Each drive has its own root directory which is the base of the disk logically, not physically. (Unix has one root directory with drives as special sub-directories in the dev directory.) Analagous to front of the top drawer of a filing cabinet.

The Root directory can have multiple directories as well as files within it. These directories exist to organize files for the user. Files contain actual data and programs. Directories and files are NOT the same. Analagous to folders in a filing cabinet. Unlike the filing cabinet, the computer may not store the files in the same order as you look at them. In fact, the directory itself is often stored as a special file, possibly in a completely different location.

Each directory may contain multiple sub-directories and/or files. These sub-directories may contain multiple sub-directories and/or files also. And so on. A (graphical) listing of the directory structure is called the directory tree. Examples of tree: treesize, tree.com (dos), right side window of explorer, also in save as windows in most windows programs.

Files are analagous to pieces of paper in a filing cabinet. Files are where actual information is stored. Directories exist soley to organize files, primarily for the user's benefit. Information contained within a file includes pictures, web pages, text, programs, sounds, etc.

Each file has a name and usually an extension (or multiple extensions in unix). mytermpaper.doc is an example of a file, whose name is mytermpaper and whose extension is doc. Extensions are there to tell both the system and the user what type of file this is. The extension doc indicates that this is a document file, probably for Microsoft Word. html is the extension for web pages, wav and mp3 for sounds, txt for plain text, jpg and gif for pictures, mpg for movies, exe for programs. There are many other extensions specific to certain areas.

Go here for a list of unix commands and a discussion on permissions.


Please send comments to CGS3063 STAFF