50
15
I have a Windows XP box (NTFS filesystem) on which I found a file named NUL
. I have not been able to remove this file in any usual way. The file appears to be owned by Administrator
in the SYSTEM
group, unlike any other file in the same directory (the other files are owned by my user id).
How do I get rid of this file? Where did it come from?
The same applies to CON, PRN, AUX, NUL, COM1, COM2, COM3, COM4, COM5, COM6, COM7, COM8, COM9, LPT1, LPT2, LPT3, LPT4, LPT5, LPT6, LPT7, LPT8, LPT9, and CLOCK$ plus a few others - see http://en.wikipedia.org/wiki/Filename#Comparison_of_filename_limitations
– robocat – 2015-04-30T01:38:19.533Cygwin creates (or used to) a file called "nul", usually seen in "C:\cygwin\dev\nul". This is the one that I hit once every few years, I Google, and I'm brought back (again) to this question. – zarchasmpgmr – 2017-05-15T19:35:51.877
3
NUL is a system reserved word; see this Wikipedia article. A file named NUL should never exist on the filesystem; this may be caused by buggy software. You may be able to remove it using the
– bwDraco – 2011-05-11T17:30:25.240DELETE
command using Command Prompt.9@DragonLord: The filesystem doesn't have a problem with such names; for example, you can create such files within a POSIX environment. (One can find
aux.c
and similar names in software source code.) It's purely the Win32 API that manages these "device names". – user1686 – 2011-05-12T05:17:33.817