仅在命令行中删除\ file

我不小心创build一个“\”文件到我的Linux如何恢复它。 我试过rm \(因为这是逃跑的angular色,它不工作),rm'\'和RM \ \没有任何工作。

正如你所说,你不能删除文件“\”目录,因为\被用作shell转义字符。

相反,使用\字符来转义名为“\”的文件/目录:

 $ rm -i \\ 

这是我的testing:

 # Make and verify the problem $ touch \\ $ ls -ld \\ -rw-r--r-- 1 me me 0 Oct 11 16:59 \ # Remove the file: $ rm -i \\ remove \? y $ ls -ld \\ ls: \: No such file or directory