Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

phil1995

macrumors member
Original poster
Aug 4, 2008
80
0
I was recently trying to install the google androikd SDK and have somehow managed to mess up my .bash_profile and my commands such as ls are not working from the terminal prompt. It is giving me a command not found.

If I type "echo $PATH" from the terminal prompt, I simply get an entry for the android SDK

"{PATH}:/Users/phil/android-sdk-mac_x86-1.5_r2/tools"

Can someone tell me how to add the /bin path back in so that them "ls" and other commands begin to work again?

Thanks in advance.
 
You'll need to type full path names for executables. Use the following to get back into your bash profile to make edits.
Code:
/usr/bin/pico .bash_profile
I've been in a similar situation before.
 
I can not get the /usr/bin/pico .bash_profile to work.

If I do a /usr/bin/ls, I can see the list of files. If I do a ls in the /bin directory, I do not see the pico file.
 
echo $PATH
/Library/Frameworks/Python.framework/Versions/Current/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin

but only the Python path is in my .bash_profile
 
The bin directory contains the following files, but no PICO or OPEN:

bash,cat,chmod,cp,csh,date,dd,df,domainname,echo,ed,expr,hostname,
kill,ksh,launchctl,link,ln,ls,mkdir,mv,pax,ps,pwd,rcp,rm,rmdir,sh,sleep,stty,
,sync,tcsh,test,unlink,wit4path,zsh,zhs-4.3.4
 
For anyone else with this issue, I found a post on the macosx.com tech support site. Apparently, the /bin/mv .bash_profile bash_profile resets the file to original state. Hope this helps someone else.

Thanks for your help guys.

try this /bin/mv .bash_profile bash_profile

It seems your $PATH went screwy when you did some "export" on the .bash_profile. effectively the /bin/mv .bash_profile bash_profile is the same as mv .bash_profile bash_profile
 
The bin directory contains the following files, but no PICO or OPEN:

bash,cat,chmod,cp,csh,date,dd,df,domainname,echo,ed,expr,hostname,
kill,ksh,launchctl,link,ln,ls,mkdir,mv,pax,ps,pwd,rcp,rm,rmdir,sh,sleep,stty,
,sync,tcsh,test,unlink,wit4path,zsh,zhs-4.3.4

That's the contents of /bin, not /usr/bin. That's why it wasn't working for you.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.