Go Back   MacRumors Forums > Apple Systems and Services > OS X

Reply
 
Thread Tools Search this Thread Display Modes
Old Apr 1, 2010, 04:54 AM   #1
macmania82
macrumors regular
 
Join Date: Apr 2009
Terminal > "-bash: command not found" for almost anything!! Mac OS X Snow Leopard

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
__________________
I love my :apple : )
Macbook Pro 17'' unibody Anti-Glare,
Intel Core2Duo 2.80GHz, 4GB DDR3, 500GB, NVIDIA GeForce 9600GT 512MB GeForce 9400M +
macmania82 is offline   0 Reply With Quote
Old Apr 1, 2010, 08:01 AM   #2
angelwatt
Moderator emeritus
 
angelwatt's Avatar
 
Join Date: Aug 2005
Location: 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
angelwatt is offline   0 Reply With Quote
Old Apr 1, 2010, 08:22 AM   #3
macmania82
Thread Starter
macrumors regular
 
Join Date: Apr 2009
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? :/
__________________
I love my :apple : )
Macbook Pro 17'' unibody Anti-Glare,
Intel Core2Duo 2.80GHz, 4GB DDR3, 500GB, NVIDIA GeForce 9600GT 512MB GeForce 9400M +
macmania82 is offline   0 Reply With Quote
Old Apr 1, 2010, 08:23 AM   #4
belvdr
macrumors 68040
 
Join Date: Aug 2005
Quote:
Originally Posted by macmania82 View Post
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.
belvdr is offline   0 Reply With Quote
Old Apr 1, 2010, 01:40 PM   #5
angelwatt
Moderator emeritus
 
angelwatt's Avatar
 
Join Date: Aug 2005
Location: 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.
angelwatt is offline   0 Reply With Quote
Old Feb 4, 2014, 06:35 PM   #6
Featnerlouise
macrumors newbie
 
Join Date: Feb 2014
Problem Solved

Copy and pasted this "export PATH=$PATH:/bin:/usr/bin" into terminal and it fixed my problem!!! )
Featnerlouise is offline   0 Reply With Quote
Old Feb 4, 2014, 07:55 PM   #7
MacUser2525
macrumors 65816
 
Join Date: Mar 2007
Location: Canada
Quote:
Originally Posted by Featnerlouise View Post
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.
__________________
MacPro 5,1 16gb HD6870; MacPro 4,1 5,1 12x2.66ghz 24gb GT120
MacUser2525 is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > OS X

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
Using bash to call "Say" command thiagosnow Mac OS X Server, Xserve, and Networking 0 Sep 29, 2013 01:33 PM
"Applications" menu command - "item cannot be found" - owner/permissions? (10.6.8) MacOSExustio OS X 2 Jul 20, 2013 06:05 AM
Trying to extract .cab files. "-bash: unshield: command not found" matto200 OS X 0 Mar 17, 2013 04:04 PM
Did I break bash? Getting "sudo" command not found... mar2194 OS X 6 Jan 10, 2013 08:56 PM
Why does a Bash command return "is a directory"? StevenHu Mac Programming 5 Dec 17, 2012 07:03 PM

Forum Jump

All times are GMT -5. The time now is 10:35 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC