"command not found" for ls, which, open, etc.

I was trying to get git to work. After instaling it, doing "which git" gave an errmsg like "~bash: command not found" or something similar. Then I followed instructions found here http://www.jaredeasterday.com/524/issues-with-git-path-git-command-not-found/. I went to the root directory by "cd ~/" and did a "find .bash_profile" but no such file was found. So I created it per instructions on that website with just this line in it "export PATH=/usr/local/git/bin".


Having done that, "which git" now says "which: command not found". I tried to do "ls" on any directory, it says "ls: command not found". I can't even do "open -e .bash_profile" since "open: command not found".


It seems I need to find a way to edit my $PATH variable but most of the unix commands are not accessible (except cd). Can someone please help me get out of this hole I dug myself? Thanks a lot.

MacBook Pro, Mac OS X (10.7)

Posted on Nov 23, 2012 6:49 AM

Reply
4 replies

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

"command not found" for ls, which, open, etc.

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.