The operating system should support the file system. If the OS does not recognize a file type then any operation on the file will not be successful.
The files are given an extension to indicate the type of file separated by a period or a dot.
- finance.java – A java program source code file.
- program.c – A C program source code file.
- salary.doc – A MS Word document.
- flower.jpg – An image file.
The above are some examples of file types which information in the form of text, image, programming code, audio, video and binary files.
The file type decide the operation on the file. You cannot read and image file, so you need an image viewer. Similarly, C source code file needs a C compiler, not any other programming language compiler.
Here is a list of common file types recognized by most operating systems:
|executables||.exe, .com, .bin or none||machine language programs that can run immediately.|
|object||.o, .obj||compiled code that are not linked|
|source code||.c, .java, .cc, .asm, .a||source code in programming languages|
|batch||.bat, .sh||contains commands for command interpreter|
|text||.txt, .doc||text documents|
|word processor||.doc, .rtf, .rtf, .wp||word processor text documents|
|library||.lib, .a, .so, .dll||library of builtin functions|
|print or view||.jpg, .ps, .pdf||ASCII or binary files for printing or viewing|
|archive||.zip, .rar, .tar||related files grouped into one file|
|multimedia||.mpeg, .mov, .avi, .rm, .mp3||binary files containing audio, video|
Abraham Silberschatz, Peter B. Galvin, Greg Gagne (July 29, 2008) Operating System Concepts, 8 edn., : Wiley.