change directory in unix shell (special characters)

I have directory name starting with –. How to enter it with cd? Basic escape charaters is not working

# cd --smol--/
    -bash: cd: --: invalid option
    cd: usage: cd [-L|[-P [-e]]] [dir]

# cd --smol--
    -bash: cd: --: invalid option
    cd: usage: cd [-L|[-P [-e]]] [dir]

# cd  '--smol--'
    -bash: cd: --: invalid option
    cd: usage: cd [-L|[-P [-e]]] [dir]

# cd '--smol--'
    -bash: cd: --smol--: No such file or directory

# help
  GNU bash, version 4.2.37(1)-release (i486-pc-linux-gnu)


Source: unix

Leave a Reply