At EasyTechJunkie, we're committed to delivering accurate, trustworthy information. Our expert-authored content is rigorously fact-checked and sourced from credible authorities. Discover how we uphold the highest standards in providing you with reliable knowledge.

Learn more...

What is a Special File?

Jessica Reed
Jessica Reed

A special file, also known as a device file, is a file on a computer that is used with device drivers. It may appear and act like a normal file, but it includes a special name that distinguishes it from other files. This name cannot be used with any other file types. The special file can give commands to a device driver through Input/Output (I/O) system calls. This makes it easier for the file to control a specific device or part of the computer system.

A device node stores information about the special file, and uses a major and a minor number to identify the file and the driver it works with. Microsoft® uses special files in their operating systems, such as the system MS-DOS® and Windows®. An important difference is the name and how the special file is distinguished. Microsoft® refers to special files as device files, and older operating systems use reserve words to identify these special files instead of major and minor numbers.

Special files transfer data from CD-ROMs onto computers.
Special files transfer data from CD-ROMs onto computers.

Microsoft's® device files have simple keywords such as CON and PRN. They may or may not have both an input and an output command. For example, CON can both receive typed data and print computer data to the console. The keyword PRN, however, can only print text. It cannot receive any input.

To better understand how special files affect people in their day to day lives, consider a college student who has saved her term paper onto a CD-ROM to take to the campus library and print. Once she puts the CD into the computer, the computer needs to read the data on the CD and open it on the computer so the student can send it to the printer. A type of special file, known as a block device, transfers the data in blocks from the CD to the computer. Once all the blocks have been transferred, the computer can display the contents of the CD onto the computer screen.

Aside from block devices, character devices and pseudo-devices also exist. Character devices work with systems which send information one character at a time instead of in large blocks like the block devices handle. The pseudo-devices are used to interact with commands the operating system can perform that do not require a physical object to interact with. The CD-ROM is a physical object handled by a block device. A pseudo-device deals purely with commands and doesn't interact with any physical objects.

Discussion Comments


@allenJo - What I liked most about the device files was the ability to use named pipes. These were a way to redirect the output of your command.

You could take a sample file and either print out its contents or simply output them to the console window, using these pipes. The pipes were just special characters that told the device file how to treat the output.


@SkyWhisperer - I remember those days. We also used device files back in the good old days of dial-up modems.

Sometimes we would have problems connecting to a local bulletin board service (this was before the Internet was all the rage). So I would use COM commands to send special characters to the modem as part of the troubleshooting process.

It was kind of cryptic, sending and receiving all of these characters. Most of them were known as AT commands, because they started with that prefix, and were used to reset the modem when it hung or to dial a certain number. We’ve certainly come a long way since then.


In the early days of DOS, I worked with special files a lot. They were known as device files for DOS, like the article says, and they gave me a quick and easy way to debug programs I was working on.

Back then all of my coding was done in console mode, and so from time to time I would want a hard copy of the code. I would issue the PRN command at the console mode and give it the target name of the file I wanted printed.

The device file started reading the file and printed it directly to my old dot matrix printer. It was nothing fancy, but it was good enough for me to be able to look over my work in printed form.

Post your comments
Forgot password?
    • Special files transfer data from CD-ROMs onto computers.
      By: silver-john
      Special files transfer data from CD-ROMs onto computers.