Files are identified by their names. What constitutes a legal filename depends on the Operating System your computer is running under, like Windows ME, XP, or various UNIX flavors (Macintosh,Linux). Matters are made more complicated under some operating systems (Microsoft Window flavors in particular) by hiding often the complete filename. I will come back to that later when discussing some of the different operating systems in detail.
Modern computers have tens or even hundreds of thousands of different files on their storage media. In order to avoid the trouble with duplicate filenames and to bring some order into the chaos there are some special files called directory files ( or directories for short ). Under Microsoft operating systems these files are called folders giving you a totally wrong impression as to what is going on. In reality, these folders are files containing the names of other files ( including other directory files ) and information about them ( like size and dates ) in a fashion similiar to a phone book. Like a phone book you can add or delete names or rename a file. Of course, inside a normal phone you don't find names referring to another phone book, but inside a directory file you do. We refer to these then as sub-directories and the directory they are listed in as the parent directory. This gives rise to what is called a filestructure as shown in the figure below. It starts with a root-directory indicated by a single forward slash at the top, which lists a number of file names and the names of sub-directories of 1.level, each such sub-directory in turn may list the names of files and subdirectories of the 2. level, and so on.
In the figure above, red denotes the name of a directory and black is a filename. An individual file is now not only characterized by its name but also by the sequence of directories it is contained in, which is referred to as the path of the file. In the above figure there is a file :
and a file :
both files may contain totally different things although their names (sk.exe) are identical.
Note how the first slash is used to indicate the root-directory and subsequent slashes separate the names of directories. Also, in the Mircosoft world the backward slash (\) is used instead of the forward slash (/) under UNIX and Macintoshes (which are UNIX-based).
One hallmark of all UNIX systems is that a single computer is host to only a single directory tree as shown below.
Usually large sections of this tree will reside on different hard disks or on the same harddisk but different partitions. It is also possible to expand a directory tree by directories and files residing on a second (or third etc.) computer, provided the owner of the other computer(s) gives you permission to do so. The nice thing about this arrangement is that the casual user never needs to know about which files reside where on which computer.
As far as file and directory names in the UNIX world are concerned any string of characters consisting of :
letters a-z , letters A-Z , digits 0-9, period , minus sign, underscore
of any length (well there is somewhere a limit but I have yet to run into it) is totally legal. Every of these legal characters can appear multiple times or not at all and a lower case letter is distinct from its upper case counterpart. You therefore have 2*26 + 10 + 3 = 65 different characters at your disposal. Blanks (or spaces) are legal but somewhat ackward to work with and should be avoided at all costs. Actually, the above rules are conservatively stated, some of the not-mentioned characters on the keyboard (like the ~) and the blank can be used from the UNIX-point of view, but may cause some problems if your files are to be accessed by particular programs, for example web-browsers.
If you like to utilize filenames consisting of multiple words I strongly urge you to use something like :
MyOldResume , my_old_resume , my.old.resume
There are some restrictions placed on filenames and extensions.
Use only the characters : a-z , 0-9 , underscore , minus-sign There are some more legal characters but I discourage their use.Each filename consists of at most 8 of these characters followed by a period followed by at most 3 more characters. These last three characters are often refered to as the extension and particular programs produce files with particular extensions. Files containing text-based webmaterial have for example the extension .htm or .html, file containing pictures for the web have extensions of either .gif or .jpg .
Files are organized under DOS in the same fashion as under UNIX with the notable exception that a separate filestructure exists on each storage medium. A file is addressed by the name of the disk ( a single letter like A: or B: (both for floppies) and C: etc. for hardisks or CD-Roms ) followed by the path and then followed by the filename including its extension.