I did "cd kotsu-kotsu diary"
Even though the file exists, "No such file or directory" is displayed and I cannot move.
I want to solve this and move to the "kotsu-kotsu diary" directory.

In ruby ​​language, to move to the created file "kotsu-kotsu diary",
I did "cd kotsu-kotsu diary" on the terminal.
However, despite the existence of the file,
"No such file or directory" is displayed like the error message below,
I can't move to the directory.

Error message
$cd kotsu-kotsu diary
-bash: cd: kotsu-kotsu: No such file or directory
What I tried

・Check directory and typographical error
I reconfirmed the difference between the directories, but there is nothing wrong,
I also checked the typographical error in the file name itself, but it was not particularly wrong.

-Delete and recreate symbolic links
I found and implemented in another article that resolving symbolic links would solve the problem.

↓ Delete symbolic link

$unlink Personal-Application/kotsu-kotsu diary
usage: rm [-f | -i] [-dPRrvW] file ...
       unlink file

↓ Creating a symbolic link

$ln -s Personal-Application/kotsu-kotsu diary

However, even if "cd kotsu-kotsu diary" is executed, the result is the same, and in this case, this seems to be irrelevant.

Supplemental information (FW/tool ​​version, etc.)

Please provide more detailed information here.

  • Answer # 1

    You can see it by looking at the error message properly,kotsu-kotsuThere is no.
    you:"kotsu-kotsu diaryExists"
    Bash: "kotsu-kotsuDoes not exist"
    And it's not inconsistent.

    In the shell, spaces are argument delimiters, so quotes are required for arguments containing spaces.

    cd "kotsu-kotsu diary"
    cd'kotsu-kotsu diary'
    cd kotsu-kotsu\ diary

Related articles