I am curious to learn what is nul
. It is usually used:
- to hide the output of a command by redirecting
STDOUT
andSTDERR
to nul (writing2>&1
). - to create a new file with
type nul > newfile.txt
or evencopy nul newfile.txt
as How to create empty text file from a batch file? says.
I also thought it was a file:
C:\Users\username> nul
Permission denied.
C:\Users\username> where nul
INFO: Could not find files for the given pattern(s).
C:\Users\username> where /r C:\ nul
INFO: Could not find files for the given pattern(s).
I have also read this great article from https://ss64.com which says:
Create empty files using the
NUL
device.
I don't quite understand that, however.