samcbride14

Q: how can i remove all my past terminal commands?

to anyone who knows experienced with terminal and knows it well. i am new to terminal, and to find an easy fix for a problem i had with java 7 incompatability issues i turned to the internet. i found a fix which was to input a command in terminal to change my java preferences to be set as java 6. it worked fine but now a few weeks later i keep getting bugs from java 6 and ironically have found a fixed version of the java 7 problem i had before so i want to change it back from the command, but the problem is because im new to terminal i have no idea how... i have heard that you can delete your entire input history? if there is anything along the lines of this to wipe or undo previous commands it would be a great help for me

iMac, OS X Mountain Lion (10.8.3)

Posted on May 26, 2013 3:57 PM

Close

Q: how can i remove all my past terminal commands?

  • All replies
  • Helpful answers

  • by ds store,

    ds store ds store May 26, 2013 4:04 PM in response to samcbride14
    Level 7 (30,395 points)
    May 26, 2013 4:04 PM in response to samcbride14

    When you enter commands in Terminal, it remembers the past commands so one doesn't have to enter them again.

     

    So by pressing the arrow keys one can scroll through past commands.

     

     

    What your looking for is the command to undo what you did previously, which wouldn't be remembered as you haven't entered it yet.

     

     

    You can reset OS X by reinstalling it over itself, this will remove Java and you can reinstall Java 7.

     

    See #8 here

     

    ..Step by Step to fix your Mac

  • by John Galt,

    John Galt John Galt May 26, 2013 4:06 PM in response to samcbride14
    Level 8 (49,399 points)
    Mac OS X
    May 26, 2013 4:06 PM in response to samcbride14

    You want to clear Terminal's scrollback buffer?

     

    history -c

     


  • by WZZZ,

    WZZZ WZZZ May 26, 2013 4:20 PM in response to samcbride14
    Level 6 (13,112 points)
    Mac OS X
    May 26, 2013 4:20 PM in response to samcbride14

    Since you're not going backwards, you should be able to install the Java 7 over the 6, and both versions may be able to coexist.

     

    http://support.apple.com/kb/HT5648

     

    http://www.java.com/en/download/index.jsp

     

    Clearing Terminal history/past commands has nothing to do with this.

     

    Message was edited by: WZZZ

  • by LowLuster,

    LowLuster LowLuster May 26, 2013 6:10 PM in response to samcbride14
    Level 6 (12,074 points)
    May 26, 2013 6:10 PM in response to samcbride14

    Deleting the input history in terminanl has nothing to do with removing that command you ran to enable java 6. You have to find a command to disable java 6 and then enable java 7. The simplest way to do that might be to just reinstall java 7.

  • by samcbride14,

    samcbride14 samcbride14 May 27, 2013 2:57 AM in response to LowLuster
    Level 1 (0 points)
    May 27, 2013 2:57 AM in response to LowLuster

    i used a command to diasble it and it seemed like it had worked, then i downloaded java 7 but on the game which i needed java 6 for now whenever i try to open it, is unresponsive and the original terminal bash window comes up

  • by samcbride14,

    samcbride14 samcbride14 May 27, 2013 4:10 AM in response to samcbride14
    Level 1 (0 points)
    May 27, 2013 4:10 AM in response to samcbride14

    if i try to open the game it will bring up the terminal bash login

    Downloads (my name)$ export JAVA_HOME=/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home

    (my name)-iMac:Downloads sammcbride$ java -jar technic-launcher-latest.jar

    Unable to access jarfile technic-launcher-latest.jar

    (my name)-iMac:Downloads  (my name)$

     

    like i said im new to terminal so im not sure what this means

  • by WZZZ,

    WZZZ WZZZ May 27, 2013 5:29 AM in response to samcbride14
    Level 6 (13,112 points)
    Mac OS X
    May 27, 2013 5:29 AM in response to samcbride14

    Can you try opening that game by selecting it (only clicking once on it) and then right-clicking>Open with? Right now, it's set to open/execute with Terminal.

     

    Also, what do you get if you enter java -version in a new Terminal window, or after a new prompt?

     

    And what did you do in Terminal to get the Java 6 working? Maybe a link to the site where you found those instructions. Did you do this with Technic Platform?

     

    Message was edited by: WZZZ

  • by WZZZ,

    WZZZ WZZZ May 27, 2013 5:52 AM in response to WZZZ
    Level 6 (13,112 points)
    Mac OS X
    May 27, 2013 5:52 AM in response to WZZZ

    If you did that with Technic Platform, your best bet now might be to ask how to undo or remove what you did there, since it looks like that might have involved some pretty hard core system modifications.

  • by samcbride14,

    samcbride14 samcbride14 May 27, 2013 3:56 PM in response to WZZZ
    Level 1 (0 points)
    May 27, 2013 3:56 PM in response to WZZZ

    like you said i tried clicking then to open with but there is no such option, other than open, and opening always results in  a terminal window pop up.

     

    i think the only thing which will work is to try a command to re enable java 7.

     

    the other problem is im not sure exactly which website i found the original command on, seeing as i tried so many different things to fix the original problem

    thanks for the help anyway so far, hope i will fix it eventually

  • by samcbride14,

    samcbride14 samcbride14 May 27, 2013 4:16 PM in response to samcbride14
    Level 1 (0 points)
    May 27, 2013 4:16 PM in response to samcbride14

    if it helps on how to undo it, this is the original command i used :   

    export JAVA_HOME=/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home