Remove oddly named file

I accidentally saved a txt file in vi with the name ":q!".

no amount of regex tomfoolery I can think of will allow me to remove the file.

anyone got any ideas?

rm ':q!'

1 Like

I are one. Just so you know I DID try that.... lol

thnx

I've experienced similar instances.

If there are a small number of files in the directory then:

rm -i *

will allow you to step through all files answering 'n' until you get to the culprit and say 'y'.

Show us the output from the command:

printf 'XXX%sXXX\n' *:*|od -bc

when run in that directory.