Seven file types of Unix system(4.3)

Most files on a UNIX system are either regular files or directories, but there are additional types of files. The types are:

  1. Regular file. The most common type of file, which contains data of some form. There is no distinction to the UNIX kernel whether this data is text or binary. Any interpretation of the contents of a regular file is left to the application processing the file.

    One notable exception to this is with binary executable files. To execute a program, the kernel must understand its format. All binary executable files conform to a format that allows the kernel to identify where to load a program's text and data.

  2. Directory file. A file that contains the names of other files and pointers to information on these files. Any process that has read permission for a directory file can read the contents of the directory, but only the kernel can write directly to a directory file. Processes must use the functions described in this chapter to make changes to a directory.

  3. Block special file. A type of file providing buffered I/O access in fixed-size units to devices such as disk drives.

  4. Character special file. A type of file providing unbuffered I/O access in variable-sized units to devices. All devices on a system are either block special files or character special files.

  5. FIFO. A type of file used for communication between processes. It's sometimes called a named pipe.

  6. Socket. A type of file used for network communication between processes. A socket can also be used for non-network communication between processes on a single host. 

  7. Symbolic link. A type of file that points to another file.

posted @ 2012-10-06 22:04  beanmoon  阅读(228)  评论(0编辑  收藏  举报