Here’s an error reported by one of our regular reader Anu. She says, cluster-fork w
command ends up with an error “shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory“.
Here’s the complete snapshot of the error:
$cluster-fork w compute-0-0: shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory down compute-0-1: shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
Solution:
This error mostly occurs when the directory in which this command was executed does not exist anymore. For example, assume that you had changed directory to 'test'
and issued cluster-fork
command. During the execution of cluster-fork
, if the directory test
was removed (may be a program that regularly cleans disk space or mistakenly deleted from a different terminal), then 'getcwd'
will not be able to return the current working directory. Hence, cluster-fork
will return an error “getcwd: cannot access parent directories: No such file or directory”.
To fix this error, one has to just get out of that non-existent directory. Usually by issuing 'cd'
command to get to the home directory and execute cluster-fork
command.