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.
python -c 'import os; os.remove("-rf")'
--
:) Sadly, not every distribution has Python, so it is also not very portable.