- NUL:
-
In the CP/M, DOS, and Microsoft Windows operating systems, the name NUL: or simply NUL designates a special file that discards all data written to it (but reports that the write operation succeeded), and provides no data to any process that reads from it (yielding EOF immediately).
In the Windows NT system and its successors, it is named \Device\Null internally, and the DOS NUL is an alias for it. However, at the command prompt, \\.\Null is not a valid destination, since the command prompt can only access a device through an alias.
Usage
The NUL: file is typically used for disposing of unwanted output streams of a process, or as a convenient empty file for input streams. This is usually done by redirection. For example, PAUSE > NUL waits for the user to press any key without printing anything to the screen.
This concept is roughly equivalent to the /dev/null of Unix-like systems, the NIL: of Amiga operating systems, and the NL: of OpenVMS.
Note that on DOS, NUL is a very slow destination, slower than buffered file access. On modern machines this is not significant.
Categories:- CP/M technology
- Device file
Wikimedia Foundation. 2010.