Unix provides a file system in which all these processes, connections and devices are accessed via files. It provides special file types for interprocess communication. Following are the file types provided by Unix.
1. Regular Files
2. Directory Files
3. Block Special Files
4. Character Special Files
5. FIFO
6. Socket
Regular files are also called plain files. These file are used to data that can be in the form of text or binary strings. These files can contain the data entered by the user or it can also used to store the data generated by the application programs. Kernel also uses plain files to store the application programs.
Directory files are used to store the names of other files and pointers. Pointers provide us information about the location where contents of file are stored. Process can only read the directory files if read permission is granted but processes cannot write the directory files. Directory files can only be written by the kernel.
Unix system uses files to access devices attached to the system. These files are also called as device files. Device files are either block special or character special. Block special files usually used for disks as data from the disk is accessed in the form of blocks. Keyboards and networking devices transfer data asynchronously(character by character) therefore character special files are used for these devices. FIFO files are used for interprocess communication and sockets are for network communications. Socket can also be used for interprocess communication.
1. Regular Files
2. Directory Files
3. Block Special Files
4. Character Special Files
5. FIFO
6. Socket
Regular files are also called plain files. These file are used to data that can be in the form of text or binary strings. These files can contain the data entered by the user or it can also used to store the data generated by the application programs. Kernel also uses plain files to store the application programs.
Directory files are used to store the names of other files and pointers. Pointers provide us information about the location where contents of file are stored. Process can only read the directory files if read permission is granted but processes cannot write the directory files. Directory files can only be written by the kernel.
Unix system uses files to access devices attached to the system. These files are also called as device files. Device files are either block special or character special. Block special files usually used for disks as data from the disk is accessed in the form of blocks. Keyboards and networking devices transfer data asynchronously(character by character) therefore character special files are used for these devices. FIFO files are used for interprocess communication and sockets are for network communications. Socket can also be used for interprocess communication.