This question already has an answer here:
- Unix: Files starting with a dash, - 2 answers
I have been creating odd-named files every once in a while, e.g.
$ls -rthl $-rw-r--r-- 1 shamil hep 290 Aug 13 11:58 -rf
And interestingly it is impossible to remove this file with
rm -f -rf
I know I need to escape the special symbols like "-", so the issue is clear. And I used to know the solution, but have since forgotten.
How do I properly delete it?
I have tried things like this
rm -f \-rf
but to no avail.