Let us examine the approach adopted by reference to a modem attached to a serial interface. The name of the corresponding device file is /dev/ttyS0. The device is identified not by means of its filename but by means of the major and minor number of the file; these numbers are managed as special attributes in the filesystem.
The same tools used to read and write regular files are employed to write data to or read results from a device file. For instance, [email protected]> echo "ATZ" > /dev/ttyS0 sends an initialization string to a modem connected to the first serial interface.
Continue reading here: Character Block and Other Devices
Was this article helpful?