Device File

In Unix-like operating systems, a device file or special file is an interface for a device driver that appears in a file system as if it were an ordinary file. There are also special files in MS-DOS and Microsoft Windows. They allow software to interact with a device driver using standard input/output system calls, which simplifies many tasks and unifies user-space I/O mechanisms.

Device files often provide simple interfaces to peripheral devices, such as printers and serial ports. But they can also be used to access specific resources on those devices, such as disk partitions. Finally, device files are useful for accessing system resources that have no connection with any actual device such as data sinks and random number generators.

MS-DOS borrowed the concept of special files from Unix, but renamed them devices. Because early versions of MS-DOS did not support a directory hierarchy, devices were distinguished from regular files by making their names reserved words. This means that certain file names were reserved for devices, and should not be used to name new files or directories. The reserved names themselves were chosen to be compatible with "special files" handling of PIP command in CP/M. There were two kinds of devices in MS-DOS: Block Devices (used for disk drives) and Character Devices (generally all other devices, including COM and PRN devices). PIPE, MAILSLOT, and MUP are other standard Windows devices.

There are two general kinds of device files in Unix-like operating systems, known as character special files and block special files. The difference between them lies in how data written to them and read from them is processed by the operating system and hardware. These together can be called device special files in contrast to named pipes, which are not connected to a device but are not ordinary files either.

Read more about Device File:  Implementation, Pseudo-devices, Node Creation, Linux Naming Conventions, Devfs, MS-DOS

Famous quotes containing the words device and/or file:

    One good reason for the popularity of “reductionism” among the philosophical outposts of the Western Establishment is that it can be, and is, used as a device for trying to take the wind, so to speak, out of the sails of Marxism.... In essence reductionism is a kind of anti-Marxist caricature of Marxist determinism. It is what anti-Marxists pretend that Marxist determinism is.
    Claud Cockburn (1904–1981)

    While waiting to get married, several forms of employment were acceptable. Teaching kindergarten was for those girls who stayed in school four years. The rest were secretaries, typists, file clerks, or receptionists in insurance firms or banks, preferably those owned or run by the family, but respectable enough if the boss was an upstanding Christian member of the community.
    Barbara Howar (b. 1934)