How to clear terminal command history?

Is it possible to clear the previous commands in terminal (up arrow key cycles through every entered line)?

Hi, blankets.
You wrote: "Is it possible to clear the previous commands in terminal (up arrow key cycles through every entered line)?"Yes. At the terminal prompt, type
history -c
and press Return.
Good luck!
Dr. Smoke
Author: Troubleshooting Mac® OS X

Similar Messages

  • How to Clean the Command History in SAP Logon Screen

    Hi
    Can any one let me know on how to clean the Command History (Where we generally enter the T Codes) in SAP Logon Screen.
    I dont want to List/see all the Previous command Hits in drop down box.
    Thanks
    Dan

    Hi Eric and Markus,
    We found the Solution and off course we did good R & D, Finally I am able to implement the fix to Clear the Command Line History.
    All I did is I Disabled the Permissions for Code Folder (Right Click > Permissions > Deny) in Regedit.
    Thats It, The Commands stopped storing in the History.
    Thank you Erick and Markus.
    Rg
    Dan

  • How to run Terminal commands in Xcode?

    Anyone knows how to include Terminal commands ( like sudo) in Xcode?  for example in a line of my program I need to run this:
    sudo open/Library/Preferences/com.apple.sharing.firewall.plist
    I searched the library but found no class or routine for that.

    Well, I am not a professional programmer, but one of the things I continue to learn is how to wade through all of the Cocoa documentation (and it does get deep in spots).  Chances are though, no matter what you are trying to do, Apple or some third party has created a class to make it easier - you just have to find it.  My Xcode documentation bookmarks continue to grow, but you might start with some of Apple's documentation, such as
    Cocoa Fundamentals Guide
    Foundation Framework Reference
    Application Kit Framework Reference

  • How to clear the location history in reminder?

    heyy guys. serious talk here. please please and please help me to figure this out. how to clear the location that had i been used in reminder? i've search from day to day. but there aren't answer yet. grr

    delete single message or delete entire thread?
    Single message: open messages, then open the thread, then press and hold on the message that you want to delete.
    Entire thread: Open messages, then press and hold on the thread you want to delete.
    When you go through text message and you click on button to bring up Roller Top Chain contacts, there is couple choices (groups, contacts, favorites & logs) you can choose. Under logs, how to you delete the information in logs section????? It appears to only go back a few days, but can't find option to erase logs. If you check box it just adds that person to your send to Sushi Chains. I also tried deleting history for phone calls, but its still there. Any help would be great!!!

  • How to clear show isdn history

    Hi,
    show isdn history command will give active and inactive calls details. I wanted to clear this command output. Shall I know the relevant command for this. IOS is 12.2(8)T5
    Regards
    Sivakondala Rao

    Hi
    can you try clear interface brix/x ?
    regds

  • Md63- How to clear the Item history

    Hi Folks,
    In MD63 I have got the item history which dates back to 10 years and user wants to get rid off this long history.
    Could any body susggest how to clear this history.
    Thanks,
    Sunil

    Use MD76 tcode to delete the history. enter the key date and plant material or just key date and plant and req type etc.

  • How to save terminal command as application

    Does anybody know how to save this terminal command as an application? This is the command that I use to backup my computer, but it is annoying having to copy and paste it into terminal every time I want to use it. Here is the command:
    sudo rsync -auE --progress / /Volumes/Backup
    If I Paste this into terminal, it asks me for my password, then starts backing up. When I enter it into automator or applescript editor, there is an error. Thanks in advance!

    I tried saving a shell script command in an Applescript but when I run the script, it runs but then I get a spinning wheel, as if the script is in an endless loop. Can someone clarify what I need to do?
    My script:
    do shell script "/System/Library/CoreServices/Finder.app/Contents/MacOS/Finder & disown"

  • How to clear Google search history

    HI,
    Ever since I updated to 2.1 it has been impossible to clear my Google search terms. Clearing the cache, cookies, etc in 'settings' has no effect.
    Does anyone know how to clear them?

    I'd try a reboot just to see if it fixes the issue.
    Try a reboot (described below).
    Think of it this way, the iPhone is more of a computer than a phone. It suffers from being a new OS and nobody can deny there are not bugs and memory leaks. The longer left running, the more things start to fail or slow down (I have had the iPhone since day one of original phone and I am just speaking from my experience). Thus I equate it to like when Windows95 came out...not sure of your age or if you remember those days...but back then it was a running joke of how many days you can keep Windows 95 running before you had to reboot. I am sorry to say but the iPhone is the same way right now (but getting better with a few hiccups back during the 2.0 release). So for me, I reboot daily when I leave in the morning and take it off the charger. By doing so I rarely see any lag or problems.
    A reset/reboot is:
    Go to Home Screen
    Press and Hold Home Button
    Keep holding and press and hold Lock Button
    Keep holding Both
    You will see Slide to Turn Off (Don't let go to slide, just keep holding)
    The phone will turn off (in time, but screen will look like it has some white lines)
    Keep Holding
    When you see the Apple Logo, you can let go.
    Turning off via the Slide to Turn off while good and fine to turn off, is more like the Sleep Mode on a computer. Thus any locked up issues in memory remain when you turn back on. A reboot as described is like doing a real Turn off and Turn On on a computer.
    You may also wish to read this tread about reboots and odd application behavior.
    http://discussions.apple.com/message.jspa?messageID=5851978#5851978

  • How to save terminal command and output history to pdf on exit?

    When I exit a terminal session (terminal.app), I would like to automatically save the commands and output from the session to a PDF (or text file) as a reference. 
    I can do this manually in Terminal by selecting Shell --> Print... --> PDF --> Save as PDF...
    Unfortunately, I'm too forgetful to remember to do this each time before I exit. 
    Is there an alias I could set or some other method to automatically save the contents of my session to a PDF when I exit?
    Thank you in advance,
    jjw

    Frank,
    Your response was helpful, but I realized after looking at my .bash_history file that only the commands entered are listed, not the output.  I would like my commands to be printed out, but also the result from the commands (in this simple example, the directory listing):
    myuserid[~/galaxy-dist/tools]$ cd ncbi_blast_plus
    -------------------------------------------------------------------------------- ----------------------------------------------------- 09:48:37
    myuserid[~/galaxy-dist/tools/ncbi_blast_plus]$ ls
    blastxml_to_tabular.py   hide_stderr.py           ncbi_blastp_wrapper.xml  ncbi_tblastn_wrapper.xml
    blastxml_to_tabular.xml  ncbi_blastn_wrapper.xml  ncbi_blastx_wrapper.xml  ncbi_tblastx_wrapper.xml
    -------------------------------------------------------------------------------- ----------------------------------------------------- 09:48:38
    myuserid[~/galaxy-dist/tools/ncbi_blast_plus]$
    I'm thinking that there is an automator script or an alias that I could use so that when I type, "exit", the commands and output for the session would be sent to a PDF and then the session would close.
    I know it seems like an odd thing to want, but sometimes I'll forget the sequence of commands that gave me the correct output (plus, my command prompt has a timestamp on it, too).
    Thanks, though, for the .bash_history information.
    jjw

  • How to undo terminal commands

    ...sigh... being new to MAC I shouldn't have just assumed I could putz around and make changes like I used to with PC.
    So, I use Gradebook (I'm a teacher) and unfortunately, it's reliant on Java.
    So the other day I made the mistake of updating Java and it sent my world into a tailspin.  Gradebook suddenly stopped working.  It would just bounce in my dock but never open.
    Then I found out it was having issue with the new Java.  So I found instructions  to reverse the Java update  and go back to Java 6 here which required me to go into terminal and make changes:  http://support.apple.com/kb/HT5559?viewlocale=en_US
    I did that.  Now everyone claims that Gradebook fixed their issue with the new Java.  But I'm still having that bouncing then nothing problem.  So someone suggested I upgrade to Mavericks.  So I did... and when I re-tried Gradebook it told me I needed to download Java 6 for it to work, so I got excited thinking my problems were solved.  But nope... bouncing in the dock then nothing.
    Now I'm thinking those changes I made in Terminal are what the problem is.  So I googled how to remove those entries and I went into .bash and deleted them (kept a copy of what I was deleting though, just in case)  Didn't work.  So now I've read that I have to UNDO my changes and not delete them.  But I have no idea how to do that.
    This was my entire history in that .bash file:
    /Applications/Android\ File\ Transfer.app/Contents/MacOS/Android\ File\ Transfer ; exit;
    'lookupd -flushcache''lookupd -flushcache'
    'lookupd -flushcache'
    'lookupd -flushcache
    'lookupd -flushcache'
    /Applications/Gradebook.app/Contents/MacOS/JavaApplicationStub ; exit;
    sudo mkdir -p /Library/Internet\ Plug-Ins/disabled
    sudo mkdir -p /Library/Internet\ Plug-Ins/disabled
    sudo mv /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin /Library/Internet\ Plug-Ins/disabled
    sudo ln -sf /System/Library/Java/Support/Deploy.bundle/Contents/Resources/JavaPlugin2_NPAPI .plugin /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin
    sudo ln -sf /System/Library/Frameworks/JavaVM.framework/Commands/javaws /usr/bin/javaws
    sudo mkdir -p /Library/Internet\ Plug-Ins/disabled
    sudo mkdir -p /Library/Internet\ Plug-Ins/disabled
    sudo mv /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin /Library/Internet\ Plug-Ins/disabled
    sudo ln -sf /System/Library/Java/Support/Deploy.bundle/Contents/Resources/JavaPlugin2_NPAPI .plugin /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin
    sudo ln -sf /System/Library/Frameworks/JavaVM.framework/Commands/javaws /usr/bin/javaws
    sudo ln -s /System/Library/Java/Support/CoreDeploy.bundle/Contents/JavaAppletPlugin.plugin /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin
    sudo ln -s /System/Library/Java/Support/CoreDeploy.bundle/Contents/JavaAppletPlugin.plugin /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin
    sudo ln -s /System/Library/Java/Support/CoreDeploy.bundle/Contents/JavaAppletPlugin.plugin /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin
    sudo update_prebinding -root / -force
    sudo update_prebinding -root/-force
    exit
    sudo ln -sf /System/Library/Frameworks/JavaVM.framework/Commands/javaws /usr/bin/javaws
    man sudo
    sudo ln -sf /System/Library/Frameworks/JavaVM.framework/Commands/javaws /usr/bin/javaws
    The red are the ones I put in.  That blue one references Gradebook but I don't recall entering that.
    Help me please???   I'd really, really appreciate it! 

    There are instructions at the bottom of the page you linked to that tell you how to undo it.
    Editing the .bash_history file only removes commands from the recorded history, it doesn't undo them. Although doing that isn't going to cause any problems, it does reveal a tendency to fiddle with "arcane knowledge" without fully understanding it. That's very, very bad, as doing the wrong thing in the Terminal could easily cause irreversible damage to the system that can only be fixed by reinstalling. It could even lead to data loss.

  • How to clear Google Maps History on iPhone 3G?

    My wife and I have been looking for a house and we have been using my iPhone as a GPS to get from one address to the next. There are alot of address stored in my history now on Google Maps (for instance if I press 1 about 10 different addresses I have searched for beginning with 1 pop up). How do I clear out all of these old searches?

    Open the Map App, press the book icon in the search bar. Then tap "recents" at the bottom & "clear" at the top left.
    Cheers!
    -Bryan

  • IPhone4 how to clear google browsing history

    How do I clear my google browsing history from my IPhone4 please??

    I'd try a reboot just to see if it fixes the issue.
    Try a reboot (described below).
    Think of it this way, the iPhone is more of a computer than a phone. It suffers from being a new OS and nobody can deny there are not bugs and memory leaks. The longer left running, the more things start to fail or slow down (I have had the iPhone since day one of original phone and I am just speaking from my experience). Thus I equate it to like when Windows95 came out...not sure of your age or if you remember those days...but back then it was a running joke of how many days you can keep Windows 95 running before you had to reboot. I am sorry to say but the iPhone is the same way right now (but getting better with a few hiccups back during the 2.0 release). So for me, I reboot daily when I leave in the morning and take it off the charger. By doing so I rarely see any lag or problems.
    A reset/reboot is:
    Go to Home Screen
    Press and Hold Home Button
    Keep holding and press and hold Lock Button
    Keep holding Both
    You will see Slide to Turn Off (Don't let go to slide, just keep holding)
    The phone will turn off (in time, but screen will look like it has some white lines)
    Keep Holding
    When you see the Apple Logo, you can let go.
    Turning off via the Slide to Turn off while good and fine to turn off, is more like the Sleep Mode on a computer. Thus any locked up issues in memory remain when you turn back on. A reboot as described is like doing a real Turn off and Turn On on a computer.
    You may also wish to read this tread about reboots and odd application behavior.
    http://discussions.apple.com/message.jspa?messageID=5851978#5851978

  • How to clear the naming history of captured screenshots

    Scenario
    There is a new method to take a screenshot and save it as a file in Windows 8 and Windows 8.1: Go to the windows which you want to capture, press
    Windows logo key+PrtScn, then the full Desktop content is captured and saved as .png file to the folder
    Screenshots in Pictures library. When you create several screenshots using this method, the files are automatically numbered consecutively, which is as shown below:
    However, if the existing pictures are removed, the next screenshot would be still numbered following the previous screenshots, not starting over. For example, deleting the files Screenshot (1), Screenshot (2) and Screenshot (3), the next Screenshot would
    be still named as Screenshot (4), which is as shown below:  
    Solution
    To resolve this problem, you can use the method below:
    Press Windows logo key +R to open Run, type
    regedit, and then press Enter to open Registry Editor.
    Navigate to the key: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer
    On the right side, change the value of the DWORD ScreenshotIndex
    to 0.
     Exit Registry Editor.
    Take a capture again to check if this problem was resolved.
    Note:
    Please click Yes in the User Account Control prompt to continue.
    Before making changes to a registry key or subkey, we recommend that you export, or make a backup copy, of the key or subkey.
    If only deleting part of the screenshots, please refer to the following two scenarios (still using the above example)
    Only deleting Screenshot (1), the next capture would be named as Screenshot (1), and the following ones would be named as Screenshot (4), Screenshot (5) and so on.
    Only deleting Screenshot (2), the next capture would be named as Screenshot (2), and the following ones would be named as Screenshot (4), Screenshot (5) and so on.
    Only deleting Screenshot (3), the next capture would be named as Screenshot (3), and the following ones would be named as Screenshot (4), Screenshot (5) and so on.
    In a word, old images would not be overwritten or deleted anytime.
    Applies to
    Windows 8
    Windows 8.1
    Please click to vote if the post helps you. This can be beneficial to other community members reading the thread.

    I need to clear the history of uiwebview,
    In order to reuse the instance.
    ... But gave up to do that.
    Anyway thanks!

  • Looking for a cache-clearing Terminal command

    Hi,
    I'm trying to clean up my MacBook a bit, since last month was its third birthday. One thing I'd like to do is clear out any superfluous font, user, and system caches. I've read that the command "atsutil databases -remove" will do this in Leopard, but I am still running Tiger (I'm scared that my Logic and graphics apps will take a performance hit). Does anyone know a similar command for Tiger? If not, is it safe to manually remove cache files from the Finder to the Trash?
    Also, as a note, I'd rather not install any programs such as Cocktail.
    Thanks!

    [http://discussions.apple.com/message.jspa?messageID=7353715#7353715]
    Also:
    [Mac OS X: Starting up in Safe Mode|http://docs.info.apple.com/article.html?artnum=107393]
    [What is Safe Boot, Safe Mode? (Mac OS X)|http://docs.info.apple.com/article.html?artnum=107392]
    [Safe Boot takes longer than normal startup|http://docs.info.apple.com/article.html?artnum=107394]
    [Mac OS X 10.4, 10.5- Computer shuts down during Safe Boot|http://support.apple.com/kb/TA24054]

  • How to clear a game history from game center?

    hi all, i play clash of clans on my iphone, but unfortunately i feel bored with my game, so i choose to give it to my friend (using android).
    i've already linked the game device from my iphone to my friend's android phone, and its succesful.
    the problem is, i still can play that account from my iphone. otherwise, i want to start a clash of clans game again from beginning, i tried to erase the app, and download again, but one the app downloaded, the game is back to my account.
    my question is, is there a way to delete a game hisroty from game center? so i can start a new clash of clans game from begining, without connected to my old account.
    please help me.
    many thanks

    First, you need to make sure that your wifi cap is not stopping the app from completing the download. So connect to an unlimited wifi source.
    Second, try completely shutting off the phone. Hold down the power button until the slider appears, and slide it to turn the phone entirely off. Once it's off, start it up again. This might clear the problem.
    Third, make sure iTunes on the phone isn't tyring to download something. Go to iTunes > More > Downloads. If it is, let it finish.
    I don't know if it is possible to save the game data. It depends on how Beeline wrote the game. It may be possible to find the files on your phone by using a special app on your computer, but this can be very complicated.
    If none of the above work, I'd try contacting Apple before giving up.

Maybe you are looking for