Removing a file whose name is the backslash character

command-line-interfaceunix

I've somehow created a file called \ in a directory (yes, backslash character). I've tried all sorts of sed, find and grep fu but I just can't delete it! I know I could just delete the directory, but is there a more interesting way to fix this?

Best Answer

[root@abcdef ~]# touch \\
[root@abcdef ~]# ls -l \\
-rw-r--r--. 1 root root 0 Jul  6 09:29 \
[root@abcdef ~]# rm -f \\
[root@abcdef ~]#

ps. If you are running windows, you have corrupted NTFS.