Terminal issue need help

Discussion in 'macOS' started by tizeliza, Sep 4, 2013.

  1. tizeliza macrumors newbie

    Joined:
    Sep 4, 2013
    #1
    Hi,

    Till yesterday everything was fine..But when i opened terminal today morning and typed commands they are like

    -bash: java: command not found
    -bash: sudo: command not found etc

    I dont know what happened. Yesterday i changed envt variable..i dnt knw it is because of that..now i dnt know how to reset that because when i type

    open -e.bash_profile

    it shows,

    -bash: open: command not found

    pls help

    Tizeliza
     
  2. robbieduncan Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #2
    What ENV variable did you change? Was it the PATH by any chance?
     
  3. tizeliza thread starter macrumors newbie

    Joined:
    Sep 4, 2013
    #3
    Actually i was learning calabash testing tool..in that document they told to open bash_profile and add export Java_Home, Android_home and
    PATH: Users/tizeliza/Desktop/Robotium/adt-bundle-mac-x86_64-20130219/sdk/platform-tools
    I did everything and it was working fine. Then i quit the terminal and went home. Today when i opened they are telling 'Command Not Found'
    What to do??
    :(:confused:
     
  4. robbieduncan Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #4
    The PATH variable tells the system where the executables that implement each and every command lives. Normally you alter the PATH by adding to it. You have set it to one directory only so none of the normal commands can be found. How, exactly and in precise detail, did you alter it? Post the exact steps taken.
     
  5. tizeliza thread starter macrumors newbie

    Joined:
    Sep 4, 2013
    #5
    I think so..but i dnt knw what was the default path..i just wrote
    export PATH=/Users/tizeliza/Desktop/Robotium/adt-bundle-mac-x86_64-20130219/sdk/platform-tools
    inside the bash_profile

    how to reset PATH variable without using terminal??
     
  6. robbieduncan Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #6
    Open the bash_profile file using Text Edit and delete that line. Or change it to:

    Code:
    export PATH=$PATH:/Users/tizeliza/Desktop/Robotium/adt-bundle-mac-x86_64-20130219/sdk/platform-tools
    
     
  7. tizeliza thread starter macrumors newbie

    Joined:
    Sep 4, 2013
    #7
    but i dont know where is this bash_profile?
    Earlier i opened through commands via terminal. but now they throwing alert that 'command' is not found.
     
  8. robbieduncan Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #8
    It is in your users home directory (/Users/<user short name>). Note that it doesn't have an extension (no .txt) so Text Edit won't show it by default in the Open window.
     
  9. tizeliza thread starter macrumors newbie

    Joined:
    Sep 4, 2013
    #9
    Thanks alot for the help. Actually those files were hidden. I installed tinker tool to see the hidden files and now i got bash_profile. I deleted that file. Now everything is working fine. if required now i can create a new bash_profile and set the path. Thanks alot for your help and suggestions.
     

Share This Page