I ran a program on Windows 7 that was compiled under Cygwin and passed "NUL" as an output file name. Instead of suppressing output it actually created a file named "NUL" in the current directory. (Apparently it expects "/dev/null", even on Windows.) Now I'm stuck with this "NUL" file that I cannot delete!
I've already tried:
- Windows Explorer - error: "Invalid MS-DOS function" (yes, that is seriously what it says!)
- Command prompt using "del NUL" - error: "The filename, directory name, or volume label syntax is incorrect."
- Deleting the entire directory - same deal as just deleting the file
remove()
in a C program - also fails
How can I get rid of these NUL files (I have several by now), short of installing the full Cygwin environment and compiling a C program under Cygwin to do it?
del *.*
? – GabyNUL
has a special meaning in Windows. If it was created in a Cygwin environment, it should be removeable there as well, i.e. by doing arm NUL
. BTW: In a Windows shell (Powershell, or in a Batchfile),/dev/null
can not be used to denote the bitbucket in such cases. Cygwin programs of course do understand /dev/null. – Matrimony