Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

up vote 8 down vote accepted
[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.

share|improve this answer
    
derp. that was simple thanks. –  danodonovan Jul 6 '12 at 9:38
    
hahaha, if you need to make it hidden make it .\\ - this way you can have folder like .\\folder\\ or just \\folder\\ –  Andrew Smith Jul 6 '12 at 16:49

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.