Results 1 to 10 of 10
  1. #1
    .bash_profile messed up

    Member Since
    Dec 11, 2010
    Posts
    3
    .bash_profile messed up
    Hi everyone,

    I was wondering if anyone can tell me how to delete the .bash_profile I made..I made it and now when I'm in Terminal, none of the default commands are recognized anymore. Is there a way to go back to how it was before, with no .bash_profile?

    Here's what I put in:

    Code:
    pico .bash_profile (this will create a .bash_profile)
    - type the following in the new screen: export PATH=$
    {PATH}:<sdkfolder>/tools
    - Hit CNTRL + X
    - Hit Y (for yes to save)
    - It will return you to the terminal screen… type: exit
    Any help greatly appreciated.

    Mike

  2. #2
    .bash_profile messed up
    vansmith's Avatar
    Member Since
    Oct 19, 2008
    Location
    Toronto
    Posts
    19,398
    Specs:
    2012 13" MBP (2.5 i5, 8GB)
    Follow this to show all hidden files, delete what you need to, execute the command again replacing YES with NO and you should be good to go.
    Important Links: Community Guidelines : Use the reputation system if you've been helped.
    M-F Blog :: Write for the blog
    Writing a Quality Post

  3. #3
    .bash_profile messed up
    cradom's Avatar
    Member Since
    Feb 14, 2004
    Location
    Nederland, Texas
    Posts
    4,084
    Specs:
    13in macbook - 10.10.4
    Or: rm .bash_profile
    Assuming you're in your home folder.
    If you typed that command as it's written you got caught by wordwrap.
    it should be:
    export PATH=${PATH}:<sdkfolder>/tools
    where <sdkfolder> is the path to the folder where the SDK is.

  4. #4
    .bash_profile messed up

    Member Since
    Dec 11, 2010
    Posts
    3
    I tried that but my Terminal doesn't accept any commands. Please look at the screenshot I've attached. Sorry, I'm a total newbie to Mac Terminal...
    Attached Images Attached Images

  5. #5
    .bash_profile messed up
    vansmith's Avatar
    Member Since
    Oct 19, 2008
    Location
    Toronto
    Posts
    19,398
    Specs:
    2012 13" MBP (2.5 i5, 8GB)
    I posted that last night when I was quite tired (it should still work though). In the meantime, you can execute the commands with the full path. rm is at /bin/rm if you use cradom's method and defaults is at /usr/bin/defaults.
    Important Links: Community Guidelines : Use the reputation system if you've been helped.
    M-F Blog :: Write for the blog
    Writing a Quality Post

  6. #6
    .bash_profile messed up
    cradom's Avatar
    Member Since
    Feb 14, 2004
    Location
    Nederland, Texas
    Posts
    4,084
    Specs:
    13in macbook - 10.10.4
    Or you can get TinkerTool and show invisibles to delete it.
    Forgot/didn't realize the rm command probably wouldn't work with the path messed up.

  7. #7
    .bash_profile messed up

    Member Since
    Dec 11, 2010
    Posts
    3
    Thanks, the Tinker program worked great. Thanks again.

    Mike

  8. #8
    .bash_profile messed up

    Member Since
    Jan 27, 2011
    Posts
    1
    same issue
    I am having the same issue with incorrect commands and files not being found. which files did you delete in order to start over creating a new pico .bash_profile?

  9. #9
    .bash_profile messed up

    Member Since
    Feb 18, 2011
    Posts
    4
    If you have a second mac handy, and a firewire cable, you can boot to target disk mode and run the command to show hidden files from the second machine. You can then navigate to /.bash_profile (ON THE AFFECTED MACHINE) and trash it.
    The syntax for showing hidden files is:
    PHP Code:
    defaults write com.apple.finder AppleShowAllFiles TRUE 
    then restart finder with:
    PHP Code:
    killall Finder 

    From here you can just go to /.bash_profile (again, on the affected machine) and trash or rename it.

    Re-hide hidden files with
    PHP Code:
    defaults write com.apple.finder AppleShowAllFiles FALSE 
    and kill finder again.

    Alternately, from the second mac you could just:
    PHP Code:
    sudo rm -rf [dragpathtofile

  10. #10
    .bash_profile messed up

    Member Since
    Oct 30, 2012
    Posts
    1
    Smile TinkerTool worked
    ... great for me. was desperate because no command was found any more. just deleted the messed up .bash_profile (something was wrong with PATH in there), and now i can use commands again!

    thx!!!

    karl07

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. messed up
    By hotrod351 in forum Apple Desktops
    Replies: 2
    Last Post: 10-20-2011, 01:22 AM
  2. need help os messed up??
    By abush1984 in forum OS X - Operating System
    Replies: 4
    Last Post: 04-27-2010, 10:15 PM
  3. I Messed Up... Can ANYONE help?
    By Masna in forum OS X - Operating System
    Replies: 0
    Last Post: 02-07-2010, 02:53 PM
  4. HELP! I've messed up!
    By cjrobbins in forum Switcher Hangout
    Replies: 15
    Last Post: 02-14-2007, 12:38 AM
  5. I messed up... help me!
    By Mogzilla in forum Apple Notebooks
    Replies: 2
    Last Post: 10-07-2005, 10:24 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •