Terminal says Command not Found

Discussion in 'OS X' started by guydude193, Jul 1, 2009.

  1. macrumors 6502a

    Joined:
    May 15, 2009
    Location:
    MI
    #1
    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:
     
  2. macrumors 68020

    Joined:
    Oct 12, 2006
    #2
    Open terminal preferences. Open settings, Open Shell, there is some command trying to run when you start each new session, uncheck that.
     
  3. thread starter macrumors 6502a

    Joined:
    May 15, 2009
    Location:
    MI
    #3
    Would that check be the box that's under Startup? Because there's nothing there.
     
  4. macrumors 68020

    Joined:
    Oct 12, 2006
    #4
    Hrm, alright. Do you have something running in your bash profile? (~/.bash_profile)

    Or system wide? /bin/bashrc
     
  5. thread starter macrumors 6502a

    Joined:
    May 15, 2009
    Location:
    MI
    #5
    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)
     
  6. macrumors Core

    miles01110

    Joined:
    Jul 24, 2006
    Location:
    The Ivory Tower (I'm not coming down)
    #6
    Er, what exactly is the problem here? "on" is not a standard unix command in the first place, so why would it work?
     
  7. macrumors 68020

    steviem

    Joined:
    May 26, 2006
    Location:
    New York, Baby!
    #7
    Where's the command 'on' in the original excerpt?

    just do this:

    Code:
    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.
     
  8. macrumors 6502a

    MacManiac76

    Joined:
    Apr 21, 2007
    Location:
    Arizona
    #8
    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.
     
  9. macrumors 68020

    steviem

    Joined:
    May 26, 2006
    Location:
    New York, Baby!
    #9
    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:

    Code:
    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.
     
  10. macrumors Core

    miles01110

    Joined:
    Jul 24, 2006
    Location:
    The Ivory Tower (I'm not coming down)
    #10
    :facepalm:

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

    steviem

    Joined:
    May 26, 2006
    Location:
    New York, Baby!
    #11
    It's still early in the morning - I wasn't seeing well enough to see the 2-18-09 command attempt either!
     
  12. Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #12
    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. 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.
     
  13. thread starter macrumors 6502a

    Joined:
    May 15, 2009
    Location:
    MI
    #13
    There's nothing at all in the text file. Just blank.
     
  14. macrumors 68020

    sidewinder

    Joined:
    Dec 10, 2008
    Location:
    Northern California
    #14
    In Terminal, do this:

    cd ~
    grep 2-18-09 *

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

    S-
     
  15. thread starter macrumors 6502a

    Joined:
    May 15, 2009
    Location:
    MI
    #15
    Thanks to everybody. I've used that command and all is well. Thank you guys very much! :apple:
     

Share This Page