Special files

This type of file is used to represent a real physical device such as a printer, tape drive or terminal.

It may seem unusual to think of a physical device as a file, but it allows you to send the output of a command to a device in the same way that you send it to a file. For example:

cat scream.au > /dev/audio

This sends the contents of the sound file scream.au to the file /dev/audio which represents the audio device attached to the system. Guess what sound this makes?

The directory /dev contains the special files which are used to represent devices on a UNIX system.


[Home] [Search] [Index] This site maintained by webmaster@deslab.mit.edu