PDA

View Full Version : Terminal says Command not Found




guydude193
Jul 1, 2009, 11:23 PM
Last login: Tue Jun 30 15:38:02 on console
-bash: 2-18-09: command not found


I can use the Control>C command to quit that and return to normal. But it's a waste of time and I can't seem to figure it out. A Genius Bar Genius said to Archive and Install, but I don't think it's necessary. I just want to know how I can find whatever it is that's screwing it up. Thanks!:apple:



Matthew Yohe
Jul 1, 2009, 11:29 PM
Last login: Tue Jun 30 15:38:02 on console
-bash: 2-18-09: command not found


I can use the Control>C command to quit that and return to normal. But it's a waste of time and I can't seem to figure it out. A Genius Bar Genius said to Archive and Install, but I don't think it's necessary. I just want to know how I can find whatever it is that's screwing it up. Thanks!:apple:

Open terminal preferences. Open settings, Open Shell, there is some command trying to run when you start each new session, uncheck that.

guydude193
Jul 1, 2009, 11:35 PM
Open terminal preferences. Open settings, Open Shell, there is some command trying to run when you start each new session, uncheck that.

Would that check be the box that's under Startup? Because there's nothing there.

Matthew Yohe
Jul 1, 2009, 11:39 PM
Would that check be the box that's under Startup? Because there's nothing there.

Hrm, alright. Do you have something running in your bash profile? (~/.bash_profile)

Or system wide? /bin/bashrc

guydude193
Jul 1, 2009, 11:49 PM
Hrm, alright. Do you have something running in your bash profile? (~/.bash_profile)

Or system wide? /bin/bashrc

To be honest, I'm new at the Terminal stuff and only use it to change the look of my Dock once in a while. How would I find that. (Sorry)

miles01110
Jul 2, 2009, 02:45 AM
Er, what exactly is the problem here? "on" is not a standard unix command in the first place, so why would it work?

steviem
Jul 2, 2009, 03:21 AM
Where's the command 'on' in the original excerpt?

just do this:

cat ~/.bashrc > ~/Desktop/bashrc

This will make a text file on your desktop containing your bash settings. Open the file up in text edit and then you can have a look at it, then you could probably paste the text into this thread (bashrc shouldn't have any identifying data in it) and we could put some fresh eyes on it.

MacManiac76
Jul 2, 2009, 03:24 AM
Er, what exactly is the problem here? "on" is not a standard unix command in the first place, so why would it work?

The command being attempted is not "on" it is "2-18-09". It is most likely a bad command in the .bash_profile as previously stated. You could just run rm .bash_profile from your home folder while in Terminal and see if that fixes it.

steviem
Jul 2, 2009, 03:39 AM
Yeah, you could do that, but you'll also lose other things which are setup.

You could also do this to see if bashrc holds the problem:

cat ~/.bashrc | grep 2-18-09

If you get an output then you will know that your .bashrc is trying to run that command. you can then open your .bashrc file (I like vi to edit files, but nano is popular too), and take that line out.

miles01110
Jul 2, 2009, 03:44 AM
Where's the command 'on' in the original excerpt?


:facepalm:

Sorry, I'm an idiot. I was looking at the wrong line.

steviem
Jul 2, 2009, 03:55 AM
It's still early in the morning - I wasn't seeing well enough to see the 2-18-09 command attempt either!

angelwatt
Jul 2, 2009, 08:40 AM
The file causing the issue could be under a couple names. To help this along if you have trouble with the other advice here, download TextWrangler (http://www.barebones.com/products/TextWrangler/). It has an option to open hidden files, which be of help as the issue is in a hidden file. Once you have the app open, go under File and choose Open Hidden. Go to your home directory, the folder with your name. Look for files named .bashrc, .bash_profile, and .profile. One of those should exist. Once you find a file(s) with text in it, post the contents here and we will help you sort out the problem.

guydude193
Jul 2, 2009, 11:56 AM
Where's the command 'on' in the original excerpt?

just do this:

cat ~/.bashrc > ~/Desktop/bashrc

This will make a text file on your desktop containing your bash settings. Open the file up in text edit and then you can have a look at it, then you could probably paste the text into this thread (bashrc shouldn't have any identifying data in it) and we could put some fresh eyes on it.

There's nothing at all in the text file. Just blank.

sidewinder
Jul 2, 2009, 05:51 PM
In Terminal, do this:

cd ~
grep 2-18-09 *

What file contains the string "2-18-09"?

S-

guydude193
Jul 2, 2009, 09:05 PM
The command being attempted is not "on" it is "2-18-09". It is most likely a bad command in the .bash_profile as previously stated. You could just run rm .bash_profile from your home folder while in Terminal and see if that fixes it.

Thanks to everybody. I've used that command and all is well. Thank you guys very much! :apple: