Search code examples
macoscd

mac osx: how to cd to the folder with a name which the first character is "-"?


There is a foler which name is "-Tmp-", how can I cd into it?

When I use cd, it prompt as:

$ cd -Tmp-/
cd: -T: invalid options

Anybody can help me?


Solution

  • Use -- to stop argument parsing.

    $ cd -- -Tmp-