How can I open a file whose name starts with "-"?

Posted by PJ on Server Fault See other posts from Server Fault or by PJ
Published on 2010-03-21T04:58:58Z Indexed on 2010/03/21 5:01 UTC
Read the original article Hit count: 443

Filed under:
|
|

I am running Ubuntu, and would like to open a file whose file name starts with "-"(minus). When I try to open the file with pico or vim, the command thinks that the "-" sign is an option for the command.

I tried enclosing the file name with quotes ('), but I still get the same error.

I tried with bash and zsh, but still the same error.

© Server Fault or respective owner

Related posts about bash

Related posts about zsh