nul – Windows CMD –


The null device is a special file that discards all data written to it, but reports that the write operation succeeded.

Nul is often used to hide the output (or error output) of a command.
It is called NUL rather than NULL for historical reasons, many other devices have 3 character names: AUX, PRN, CON, etc.
It’s not possible to create a file named “nul” on Windows.


SomeCommand >nul

Nul provides no data to any process that reads from it (yielding EOF immediately)

For more examples see the redirection page.

“Never mistake activity for achievement.” ~ John Wooden

Related commands:

BREAK – Do nothing, successfully.
PRN – redirect to the printer LPT1.
Equivalent PowerShell: $Null


Some rights reserved

Copyright © 1999-2022 Some rights reserved

Rate this post