Device File
In Unix almost all things are handled as files and have a location in the file system — even hardware devices like hard drives. The great exception for devices and the files that represent them are network devices that do not turn up in the file system but are handled separately.
Device files are used to apply access rights and to direct operations on the files to the appropriate device drivers.
Unix makes a distinction between character devices and block devices. The distinction is roughly as follows:
- character devices provide only a serial stream of input or output;
- block devices are randomly accessible;
although, for example, disk partitions may have both character devices that provide unbuffered random access to blocks on the partition and block devices that provide buffered random access to blocks on the partition.
A character device is marked with a c as the first letter of the mode string. Likewise, a block device is marked with a b, e.g.
Read more about this topic: Unix File Types
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 (19041981)
“Probably nothing in the experience of the rank and file of workers causes more bitterness and envy than the realization which comes sooner or later to many of them that they are stuck and can go no further.”
—Mary Barnett Gilson (1877?)