Ash: getcwd: No such file or directory

In openwrt 21.02 I am getting this "ash: getcwd: No such file or directory" whenever I execute some command. What is causing this and how can I resolve it?


That happens if your current workding directory/ pwd (basically the directory you are issuing your commands from) no longer exist (has been deleted after you entered it).


But how pwd get deleted ?


The "pwd" command was not deleted, and is working as expected. The folder from where you are executing the commands is what got deleted. Just move to another folder, and try again.

1 Like