bash で Tab をクリックすると、エラー メッセージが表示されます。何が問題なのでしょうか?
symlink-hook: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
symlink-hook: error retrieving current directory: getcwd: cannot access parent directories: Success
symlink-hook: error retrieving current directory: getcwd: cannot access parent directories: Success
symlink-hook: error retrieving current directory: getcwd: cannot access parent directories: Success
symlink-hook: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
symlink-hook: error retrieving current directory: getcwd: cannot access parent directories: Success
symlink-hook: error retrieving current directory: getcwd: cannot access parent directories: Success
symlink-hook: error retrieving current directory: getcwd: cannot access parent directories: Success
場合によっては、エラー メッセージは次のようになります。
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No s uch file or directory
シェルの初期化の問題を解決するにはどうすればよいですか?
ベストアンサー1
これは通常、現在のディレクトリがもう存在しない場合に発生します。おそらく、別のターミナルから (スクリプト内などから) そのディレクトリを削除したのでしょう。その間に現在のディレクトリが再作成された場合にこれを取り除くには、cd
別の (既存の) ディレクトリにしてから元cd
に戻すだけです。最も簡単な方法は次のとおりですcd; cd -
。