Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I seem to be getting a getcwd error suddenly throughout my system. Thoughts anyone.

shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
share|improve this question

Have you deleted the directory you are in?

Try cd / or cd ~.

share|improve this answer
    
This is generally the problem when pwd fails. cd alone should work, as it seems to default to the home directory. Attempts to pushd a now non-existent directory fail better: they pop the no-more dir and push the current dir. – Jeremy W. Sherman Feb 13 '11 at 19:08
    
rare, and cd will resolve, but what is it, if not that the current directory was deleted? Is this something that sinks suspicions, a filesystem problem creeping up on you? – chillin Dec 6 '14 at 4:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .