某客户发过来一个日志压缩包,处理完问题后,想把这个解压后的日志目录给删除,却发现,好像是中了客户下的毒。操作系统是Windows 7,直接在界面删除,会提示”文件目录过长,不能删除“的消息,切换到控制台,用del + 文件名,没有一点反应。
这个目录的特点是,每个子目录的目录名都很长,而且根本不知道里面有多少层,你以为是点击到了最底层目录了,结果又像递归那样,从一级目录开始,继续显示到最底层目录。不过奇怪的是,目录名倒是可以改,我把外面几层的目录名都改为1了,奇怪的是,里面底层的目录名也显示1,真的有点像病毒。最后找了一下,再试了几次,"del /f/s/q " and "rmdir /s /q " 这2个命名帮上了忙,最后终于把这个目录给清除了。
E:\22\22\1\1\1\1\1\1\1\1\1\1\1\1\1\1>del /f/s/q 1
E:\22\22\1\1\1\1\1\1\1\1\1\1\1\1\1\1>
E:\22\22\1\1\1\1\1\1\1\1\1\1\1\1\1\1>
E:\22\22\1\1\1\1\1\1\1\1\1\1\1\1\1\1>cd E:
E:>del /f/s/q 1
E:>dir
Volume in drive E has no label.
Volume Serial Number is 74B0-3838
Directory of E:
11/10/2016 03:12 PM <DIR> .
11/10/2016 03:12 PM <DIR> ..
11/10/2016 03:12 PM <DIR> 22
0 File(s) 0 bytes
3 Dir(s) 85,324,791,808 bytes free
E:>
E:>
E:>dir
Volume in drive E has no label.
Volume Serial Number is 74B0-3838
Directory of E:
11/10/2016 03:12 PM <DIR> .
11/10/2016 03:12 PM <DIR> ..
11/10/2016 03:12 PM <DIR> 22
0 File(s) 0 bytes
3 Dir(s) 85,324,791,808 bytes free
E:>
E:>del /f/s/q 22
E:>dir
Volume in drive E has no label.
Volume Serial Number is 74B0-3838
Directory of E:
11/10/2016 03:12 PM <DIR> .
11/10/2016 03:12 PM <DIR> ..
11/10/2016 03:12 PM <DIR> 22
0 File(s) 0 bytes
3 Dir(s) 85,324,791,808 bytes free
E:>rm dir /s /q 22
'rm' is not recognized as an internal or external command,
operable program or batch file.
E:>rmdir /s /q 22
E:>dir
Volume in drive E has no label.
Volume Serial Number is 74B0-3838
Directory of E:
11/10/2016 03:18 PM <DIR> .
11/10/2016 03:18 PM <DIR> ..
0 File(s) 0 bytes
2 Dir(s) 85,324,804,096 bytes free
E:>
E:>
E:>cd ..
E:>del 22
E:\*, Are you sure (Y/N)? y
E:>dir
Volume in drive E has no label.
Volume Serial Number is 74B0-3838
Directory of E: