sh: 0: getcwd() failed: No such file or directory on cited drive sh: 0: getcwd() failed: No such file or directory on cited drive linux linux

sh: 0: getcwd() failed: No such file or directory on cited drive


This error is usually caused by running a command from a directory that no longer exist.

Try changing your directory and re-run the command.


That also happened to me on a recreated directory, the directory is the same but to make it work again just run:

cd .


Try the following command, it worked for me.

cd; cd -