How to delete file with option character in name in Linux

command-line-interface

I've got a file called -T on my linux box, and, I thought I could do

 rm "-T"

or

 rm "\-T"

or

 rm \-T

or

 rm *T

Alas, I've run out of simple tricks (or I'm misuing them).

I keep getting the error message:

rm: invalid option -- T

I'm pretty sure I could delete this file with some FTP client, but that feels like cheating. Can someone point me in the right direction?

Best Answer

A lot of *nix commands have a '--' option, which means "this is where the options end, anything from here onwards that looks like an option, isn't".

rm -- -filename

Not 100% sure if rm supports that, I'm a bit rusty.