What is a special file?

Asked 16-Oct-2018
Viewed 630 times

1 Answer


0

A special file is a type of file stored in a file system of a computer operating system. A device file is another name for a particular file.

A special file's aim is to expose the device as a file in the file system. Because file I/O tools can access the device, a special file provides a universal interface for physical devices (including virtual devices produced and utilized by the kernel).

When data is read from or written to a special file, the action occurs instantly and is not governed by standard filesystem rules.

Special files in Linux are divided into two categories: block special files and character special files.

In a character special file, data is written one character (eight bits, or one byte) at a time, analogous to a block device.

A block special file is used to interact directly with a block device. Any device that conducts data I/O in blocks is referred to as a block device.