Please note that the content of this book primarily consists of articles
available from Wikipedia or other free sources online. 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 device 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. 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 device files. Because early
versions of MS-DOS did not support a directory hierarchy, device files
were distinguished from regular files by making their names reserved
words. This means that certain file names are reserved for device files,
and cannot be used to name new files or directories.