Here is an example. I am creating a directory called - and I can not cd into it. The cd - returns me to the previous directory. And I'm a little surprised that the cd "-" works the same way. I can enter this directory using the full path ~/- , but is there any other way?
user@server:~$ cd /tmp user@server:/tmp$ cd user@server:~$ mkdir - user@server:~$ cd - /tmp user@server:/tmp$ cd user@server:~$ cd "-" /tmp user@server:/tmp$ cd ~/- user@server:~/-$
bash cd
bessarabov
source share