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?

image

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).

2 Likes

But how pwd get deleted ?

image

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