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

macmania82

macrumors regular
Original poster
Apr 14, 2009
199
0
Hi friends,

I'm using Mac OS X Snow Leopard.

whenever I try almost any command at Terminal, I come across an annoying message like:

-bash: unzip: command not found
this is a sample for i tried unzip, but it happens for so many other command as well

so what is that? do I need to install anything to make terminal work with these commands?

Appreciate helps! thanks
 

angelwatt

Moderator emeritus
Aug 16, 2005
7,852
9
USA
Sounds like the path variable may have gotten befuddled. Try running the following,

Code:
/bin/echo $PATH
I get the following, but yours won't be exactly the same.
Code:
/opt/local/bin:opt/local/sbin:/Applications/MAMP/bin/php5/bin:/Applications/MAMP/Library/bin:/Applications/Adobe AIR SDK/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin
 

macmania82

macrumors regular
Original poster
Apr 14, 2009
199
0
Code:
/bin/echo $PATH

give the line below:

Code:
/opt/local/bin:/opt/local/sbin:/Library/Frameworks/Python.framework/Versions/2.6/bin:/Library/Frameworks/Python.framework/Versions/Current/bin:/opt/subversion/bin/:PATH

so what does it mean? :/
 

belvdr

macrumors 603
Aug 15, 2005
5,945
1,372
Code:
/bin/echo $PATH

give the line below:

Code:
/opt/local/bin:/opt/local/sbin:/Library/Frameworks/Python.framework/Versions/2.6/bin:/Library/Frameworks/Python.framework/Versions/Current/bin:/opt/subversion/bin/:PATH

so what does it mean? :/

Your PATH is messed up, particularly the end of it. Were you modifying /etc/bashrc or .bashrc in your home directory?

You want to modify the PATH line above so the final word is $PATH, not just PATH.
 

angelwatt

Moderator emeritus
Aug 16, 2005
7,852
9
USA
In addition to the above, the change could have been made in a .profile folder in your home directory. This file and those mentioned by belvdr are hidden files so you will not see them in Finder unless you have hidden files shown. You may not have edited these files, some programs will edit them too, but if that's the case then they have a typo to fix.

To open these hidden files from Terminal,
Code:
/usr/bin/pico filename
I believe that's the full path to the pico editor. Not at my Mac to be certain. Alternatively,
Code:
open -t filename
will open the file in TextEdit. Just make sure TextEdit edits it as plain text instead of rich text. As a last alternative, use TextWrangler, which has a open hidden option to get to these files.
 

Featnerlouise

macrumors newbie
Feb 4, 2014
1
0
Problem Solved

Copy and pasted this "export PATH=$PATH:/bin:/usr/bin" into terminal and it fixed my problem!!! :))
 

MacUser2525

Suspended
Mar 17, 2007
2,097
377
Canada
Copy and pasted this "export PATH=$PATH:/bin:/usr/bin" into terminal and it fixed my problem!!! :))


Until you close that Terminal window or even a new one you open will have the same problem. You need to find out as was advised in this necro post you revived what screwed up the path to begin with.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.