3
Contributors
2
Replies
9
Views
1 Year
Discussion Span
Last Post by Reverend Jim
0

These are devices that appeared long ago in CP/M and DOS days. It's that simple. These are devices. Some are real such as the console and printer but nul is just that. Send something to nul and it goes there never to return.

I take it you are very new to the internet. Such devices have prior answers. Did anyone show you how to google or research yet?

3

They can be udeful when working from the command line. con is the console device. cat lists the contents of a file to the console. If you cat and redirect input from the console then cat will display everything you type. Not a useful example but still an example.

D:\>cat < con
abc
abc
def
def

nul is the null device and is useful for suppressing output. This can be useful in cmd files where you want to minimize output.

D:\>echo "hello"
"hello"

D:\>echo "hello" > nul

D:\>

Edited by Reverend Jim

Votes + Comments
Very udeful reply.
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.