How can I rename or open or do anything with this file?

Everything I try (rm, mv, cat, less, vi) gives unrecognised option '--.html'

So far, only a full ls piped to grep has been useful, or even usable.

stewart$ ls -l | grep html
-rw-rw-r-- 1 stewart stewart  18262 Mar 13 06:08 --.html
  • Thanks for that. Didn't know about the putting the lone -- first to disable options. – Stewart Mar 13 '16 at 11:42

OK, I worked it out. This worked:

rm ./--.html
  • 1
    Many programs also understand a parameter --, which will stop them from interpreting further entries starting with - as options. – Mario Mar 13 '16 at 6:47

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