删除Window上的nul文件

引言

最近我的window10上一不小心生成了一个nul文件,怎么都删除不了

网上搜了好多方法,其中最多的就是以下方法[1]:

rd /s \.\C:\aux

del \.\C:\temp\nul.exe

但是对我的不管用

解决方案

从stackoverflow中看到一个解决方案[2]:

前提是安装有Git

打开包含不可删除的文件目录

在空白处,右击,选择Git Bash Here

rm nul即可

参考资料

Window下无法删除nul文件的解决办法 ↩︎

(stackOverflow)Delete a file named “NUL” on Windows ↩︎

[an error occurred while processing the directive]