Terminal "cd" command no longer works!

Discussion in 'OS X El Capitan (10.11)' started by dauber, Apr 21, 2016.

  1. dauber macrumors regular

    dauber

    Joined:
    Jan 10, 2012
    Location:
    Chicago
    #1
    Just all of a sudden in the middle of a session, I can't get the "cd" command working!

    Whenever I try to CD to anything, I get:

    "-bash: .: /Users/Dauber: is a directory"

    The only time I get anything different is if I try to CD to a directory that doesn't exist, in which case I get, "No such file or directory."

    Rebooting didn't solve the problem.

    The only way around this is instead of "cd" I use "/usr/bin/cd" -- which is weird because no other commands in that directory have this issue.

    Any thoughts???

    Oh, btw...OSX 10.11.4.
     
  2. oester macrumors member

    Joined:
    Oct 7, 2011
    Location:
    Rochester, MN
    #2
    is the "cd" command being aliased? In terminal type "alias cd" and see what it says. Or just try "unalias cd"

    Bob
     
  3. KALLT macrumors 601

    Joined:
    Sep 23, 2008
    #3
    Does the error occur also when you close the window and try again?
     
  4. dauber thread starter macrumors regular

    dauber

    Joined:
    Jan 10, 2012
    Location:
    Chicago
    #4
    Yup.
     
  5. KALLT, Apr 21, 2016
    Last edited: Apr 21, 2016

    KALLT macrumors 601

    Joined:
    Sep 23, 2008
    #5
    @dauber: Has oester’s suggestion made a difference?

    If it does, then a configuration might have been overridden. You can check with the following commands for the common files (none of these files are present by default). You might want to post the results here if you are not sure.
    Code:
    cat ~/.bashrc
    cat ~/.bash_profile
    cat ~/.bash_login
    cat ~/.profile
     
  6. dauber thread starter macrumors regular

    dauber

    Joined:
    Jan 10, 2012
    Location:
    Chicago
    #6
    Ahhh, never mind....there was a phantom "dauber" directory in the Users folder that had no purpose, and I think it was screwing things up. There was nothing in it. I deleted it, and that solved the problem.
     
  7. KALLT macrumors 601

    Joined:
    Sep 23, 2008
    #7
    Your configuration files did look pretty messy though and I think I saw some redundancy. Perhaps you should have a look at it. If there are misconfigurations, then there may be problems that you are not even noticing.
     

Share This Page