As you have already known from the previous tutorial that files gives a way to store the required information on the disk to read that information later.
Therefore, this must be done in such a way as to shield the user from the details of how and where the required information is stored and how the disk works in storing the required information to use in the later time.
Since files are an abstract mechanism and the most important characteristic of any abstract mechanism is the way that the objects being managed are named.
In any computer system, whenever a process creates any file, then it gives a name to that file. And whenever the process terminates or stops running then the file still exists or in other work, you can say that the file continues to exist and can also be accessed by some other processes just by using the name of the file.
The rule for file naming varies from system to system, but all the current OSs allow strings as file names. Therefore, myfile, file1, my_file, etc. are the three legal file names.
Digits and special characters can also be used to name a file such as myfile!, file-2-1, file_21, 32, etc. are also legal file names.
Many file systems support the names as long as all the 255 characters.
Some file systems distinguish between the uppercase and lowercase letters, and others don't.
Here are the list of three file names:
In UNIX system, all the above three files are distinct, whereas in MS-DOS, all the above three files are same.
Almost every OS support two-part file names. This two part of the file names are separated by period/dot (.).
The part following the period (.) is called file extension and generally indicates about the file.
Here, the table given below lists the most common file extensions with their meaning:
|File Extension||File Meaning|
|myfile.bak||This indicates backup file|
|myfile.c||This indicates C programming language source file|
|myfile.gif||This indicates gif format image file|
|myfile.hlp||This indicates help file|
|myfile.html||This indicates HyperText Markup Language (HTML) file|
|myfile.jpg||This indicates jpg format image file|
|myfile.mp3||This indicates mp3 music or audio file in which music encoded in MPEG layer 3 audio format|
|myfile.mpg||This indicates mpg video file in which movie encoded with the MPEG standard|
|myfile.o||This indicates an object file|
|myfile.pdf||This indicates Portable Document Format (PDF) file|
|myfile.ps||This indicates PostScript file|
|myfile.tex||This indicates input for the TEX formatting program|
|myfile.txt||This indicates normal textual file|
|myfile.zip||This indicates compressed archive|