Save Bash History Merged?

I'd REALLY like to save BASH history from multiple windows and sessions.
How would I access the various histories of multiple windows and save them before exiting automatically?
Is there a "trap" command or something that I could script to execute upon exiting the session?  Perhaps to
merge these into a single HISTFILE?
ALSO - is there a way to dynamically update the window title header?  Such as copying the current prompt into the title
and to give details on the job, the remote machine being accessed, etc.?

I assumed that the OP knew that his problem (passwords) were in root's history.
Unless you have a habit of running sudo with -H or if you have root logins enabled, root shares your settings (since sudo without -H keeps the original user's HOME) and runs .bashrc from the original user's HOME, saves history in there etc.
Quick test with:
host user $ sudo bash
Password:
host user # echo hello_world
hello_world
host user # exit
host user $ grep hello_world .bash_history
echo hello_world
host user $

Similar Messages

  • My Fire Fox does not save my History

    My Fire Fox 3.6.6 Does not save my History
    After 3 days my History does update and places.sqlite after reaching 1000 KB it does not save important links
    == User Agent ==
    Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; (R1 1.5))

    Firefox now always stores the old session, and you can access it by going to the History menu and selecting "Restore Previous Session"
    If you want Firefox to display the message to save the session, it can be turned back on by changing some preferences.
    # Type '''about:config''' into the location bar and press enter
    # Accept the warning message that appears, you will be taken to a list of preferences
    # Locate the preference '''browser.tabs.warnOnClose''', if its value is set to '''false''', double-click on it to change its value to '''true'''
    # Repeat this for these 3 preferences '''browser.warnOnQuit''', '''browser.warnOnRestart''' and '''browser.showQuitWarning'''
    If you always open the last set of tabs, an alternative approach is this:
    # Click the orange Firefox button, then select options to open the options window
    # Go to the General panel
    # Change the setting "When Firefox starts" to "Show my windows and tabs from last time"

  • Why won't Firefox save my history, nor my "Options" choices regarding it?

    Despite all my efforts, Firefox will NOT save my history, nor my choices (such as "Remember History") made under "Tools > Options" regarding it. How can I remedy this?

    ---If you did everything I suggested, you should still have your bookmarks saved (as an html file), all you need to do is import them once you get the problem resolved. I've done worse myself, when formatting and installing an OS and then realizing I forgot to move my bookmarks.html file to the temp drive... lol.
    --- Sorry if my posts are long and contain many areas to consider/dwell, but that always seems to be the easiest & fastest way when dealing with anything tech, online. Messengers are faster but due to being a security weakness (they'll always be as long as the only "tunneling" firewall is owned by Symantec/Norton), and they never even get downloaded to my machines, so please, try to take in everything if you see it applies, and I will do my best not to steer you wrong by leaving something out.
    ---Open the tab you want to change in '''Tools | Options | etc.''' and then not only select your preference, but tic or untic a box for an "advanced/user choice". like untic "Accept Third-Party Cookies" and tic "remember search and form history". Also, untic "automatically start firefox in a private browsing session" if it's tic-ed... untic "clear history when firefox closes". Sorry if you have already, cause as you said originally, you've tried everything... but,''' if you don't change any settings (after changing the drop-down box for preferences) and click "apply", changes won't be saved.'''
    https://support.mozilla.com/en-US/questions/763870
    ---I blame M$, IE and most of all Mozilla developers if the problem spreads to everyone who has IE8 on their systems. I don't have the issue, but my IE hasn't been updated from 7 when I upgraded and freshly installed Windows XP Pro SP3. If IE 7 is giving me grief with FF, I could only imagine what newer versions of IE could screw up for FF as long as they're allowed to fornicate behind the parents' (users') backs.

  • 10.6 bash history-search-backwards

    This is a repost from http://discussions.apple.com/message.jspa?messageID=10954384
    10.6 broke my terminal history search
    In 10.4 I added
    bind '"M-[A": history-search-backward'
    bind '"M-[B": history-search-forward'
    to my .bash_profile allowing me to use the up/down arrows to search through the history in terminal, but as of 10.6 this no longer works.
    I would like the up and down arrows to perform a search of the history for the string I have typed in the terminal. That is if I had issued the following sequence of commands in the terminal,
    $cd ~/
    $nano .bash_profile
    $vi .bash_profile
    so now these commands are sequentially listed in my bash history. Now if I press the up arrow, the first command to come up will be the last one that I entered, that is, $vi .bash_profile. Now if I had instead pressed up three times, the command, $cd ~/ would come up. Now what I want bash to do, and had working in OS X 10.4, is if I type a string into the terminal (and DO NOT press ENTER) such as, $cd , then I press up, bash will search through the terminal history for the instances of the command cd that I have previously entered. This is the same behavior as the MATLAB command prompt.
    I know this is possible because it used to work. I would like to have this behavior again because it is very useful. I do know that I can use crl-R to search the history, but this is kind of a pain to use and it doesn't work very well.
    I added the above code to ~/.inputrc and now if I type the letter 'b' in terminal I get the output
    {quote}
    "": history-search-forward
    {quote}
    It only does this for the the letter 'b'. I have tried all the other keys and there is no weird output. What is up with bash?
    GNU bash, version 3.2.48(1)-release (x86_64-apple-darwin10.0)
    Also see threads:
    http://forums.macosxhints.com/showthread.php?p=569961#post569961 Mac OS X Hints 10.6 bash history-search-backwards
    http://www.macosxhints.com/article.php?story=20031026174236860 Mac OS X Hints 10.3: Assign arrow keys to history search in bash

    I have the following in my .bashrc file:
    # Setup Command line editing using vi mode (default is Emacs).
    # Map Ctrl-P and Up-arrow as command recall (previous),
    # with Ctrl-N and Down-arrow as next (foreword) command.
    # Viewing key binding:
    # bind -p | more # key bindings
    # bind -s | more # macros (like below)
    # bind -m vi-command -p | more # key bindings
    # bind -m vi-command -s | more # macros (like below)
    shopt -s -o vi # set vi command line editing.
    bind '"C-p": "ekA"' # Ctrl-P: when in insert mode
    bind -m vi-command '"C-p": "kA"' # Ctrl-P: when in insert mode
    bind '"C-n": "ejA"' # Ctrl-N: when in command mode
    bind -m vi-command '"C-n": "jA"' # Ctrl-N: when in command mode
    # I have had problems with a Linux version of Bash 2.05.8(1) that did not
    # like it when I remapped the up and down arrow keys, so if I find myself
    # with that version of bash, I do not try to remap them.
    # "cat -v" can be very useful for determing what the escape sequence being
    # issued by an keypad or function key. Keep in minde that the keypad has
    # multiple modes the terminal emulator can be placed in, which alters the
    # escape sequence, hence the multiple sets of mapping for up and down arrow
    # in both vi-insert and vi-command mode.
    if [[ "$BASH_VERSION" != 2.05.8(1) || $OSTYPE = darwin ]]; then #{
    bind '"M-OA": "ekA"' # Up-arrow: when in insert mode
    bind -m vi-command '"M-OA": "kA"' # Up-arrow: when in insert mode
    bind '"M-OB": "ejA"' # Down-arrow: when in command mode
    bind -m vi-command '"M-OB": "jA"' # Down-arrow: when in command mode
    bind '"M-[A": "ekA"' # Up-arrow: when in insert mode
    bind -m vi-command '"M-[A": "kA"' # Up-arrow: when in insert mode
    bind '"M-[B": "ejA"' # Down-arrow: when in command mode
    bind -m vi-command '"M-[B": "jA"' # Down-arrow: when in command mode
    fi #}
    The above does work for me on ALL my platforms (Mac OS X, Tiger, Leopard, Snow Leopard), Linux, Solaris, AIX, and Windows-Cygwin.
    I use vi command line editing, so if you prefer the emacs command line editing, then the above will not work for you, in some cases I map the up/down arrows and Control-P/Control-N to vi commands.

  • Lync for Mac 14.0.10 can't save conversation history to exchange

    Hi All,
    Anybody know the requirement (server and client side) for the feature to save converstation history to exchange?
    We are using Lync 2010 and Exchange 2010, with Mac 10.9.
    Even after setup office for mac 2011 outlook with all updates, still failed.
    Thanks,
    Roy

    Hi,
    Did the Lync Server and the Exchange in the same forest?
    Usually, there is no special configuration for basic integration if Lync Server and Exchange in the dame forest.
    Please also test the issue using a Windows OS computer, and check if the issue still happen.
    If the issue not happen for Windows OS system, it can be the local client issue for Mac computer.
    If the issue still happen for Windows OS System, please press Ctrl and right click Lync icon in the taskbar, open configuration information. On the open page check if EWS status and MAPI status are OK. If the EWS status not shows OK, please double check
    the EWS and autodiscover configuration for Exchange, and then test the issue again.
    Best Regards,
    Eason Huang
    Eason Huang
    TechNet Community Support

  • Does Jabber Client 9.6 have the option to save Chat history within Outlook 'Conversation history' like Lync does?

                       Does Jabber Client 9.6 have the option to save Chat history within Outlook 'Conversation history' like Lync does?
    Any guidance/response would be greatly appreceiated. thanks in advance.

    The latest release of Jabber allows you to save the chat you had in html by enabling EnableSaveChatToFile
    But yes, IM&P requires a separate server in which to hold all the messages that go thru the server, this is for management purposes, not really meant for users.
    Persistent chat will hold all the messages, but this also requires a separate DB server to hold them.
    You're free to use any other XMPP client you prefer which has this capabilities on the client side.

  • Bash history

    my bash cmdhist, invoked by the <prior> key only remembers one command. I emptied ~/.bash_history and it remembers the first command entered in the new ~/.bash_history but not the rest.
    shopt
    autocd off
    cdable_vars off
    cdspell off
    checkhash off
    checkjobs off
    checkwinsize off
    cmdhist on
    compat31 off
    compat32 off
    compat40 off
    compat41 off
    dirspell off
    dotglob off
    execfail off
    expand_aliases on
    extdebug off
    extglob off
    extquote on
    failglob off
    force_fignore on
    globstar off
    gnu_errfmt off
    histappend off
    histreedit off
    histverify off
    hostcomplete on
    huponexit off
    interactive_comments on
    lastpipe off
    lithist off
    login_shell off
    mailwarn off
    no_empty_cmd_completion off
    nocaseglob off
    nocasematch off
    nullglob off
    progcomp on
    promptvars on
    restricted_shell off
    shift_verbose off
    sourcepath on
    xpg_echo off

    Aha!  <Prior> is the <PageUp> key!  <Prior> is working on the OP's keyboard exactly the way it does on mine – it takes me to the beginning of the history file, the first command.  To access the last command in the history, use the <Up> (arrow).  More presses of the <Up> key take you further into bash history.
    Somewhat off topic, but not too far off:
    Actually, I would use '!!' to repeat the very last command and '!-2' for the command before that, and so on.  When I do not want the command to execute, I'll use this format: '!-5:p'.  That will print the fifth command back in history but won't execute it.
    You can use a pipe and grep the history command output when searching through it:
    history | grep wget
    When I find the command's event designator, I'll use it, '!507'.
    I add comments on the command line when I know I'll want a complex or a long command again soon:
    $ mupdf -r 96 ~/shared/books/poetry/pdf/leaves_of_grass.pdf 102 & # Add 26 to page no.
    That lets me search more quickly using 'Ctrl-R' and then '#' (or '##', or '###'...).
    Last edited by thisoldman (2011-12-11 23:29:44)

  • [solved] bash history disappears frequently

    I have got a very annoying problem: My bash history "resets" from time to time for no perceivable reason. I hate to lose anything less than the last, say, 500 commands and yet the ******** thing sometimes get an amnesia attack.
    Any ideas what might cause this?
    Last edited by macaco (2015-05-06 15:35:25)

    https://bbs.archlinux.org/viewtopic.php?id=150992
    If that doesn't help, post your .bashrc and other shell profile configuration files.

  • Disable / clear file Save As history

    Hello,
    I've saved numerous PDF using similar file name except for minor change (i.e. date).
    In the Save As dialog:
    Initially entering the first character of a filename will bring up a short history of filename that I've used before.
    I'd like to disable this but don't know how?
    In other word, I'd like to see no dropdown when typing in a file name.
    I'm using Acrobat 9 Standard.
    Thanks,
    Devin

    Sorry I'm using Vista.
    Since there's no official TweakUI for Vista yet, I'm running TweakUI for XP in compatibility mode.
    I've located the option "Remember previously used file names" but whenever I try to save the file, the application unexpectedly quit.
    See link:
    http://louisshanks.spaces.live.com/blog/cns!913464CD152C839E!185.entry?wa=wsignin1.0&sa=35 0127188
    The posted solution didn't seem to help.
    Either it is auto-complete or remember previous file-name that is somewhat interferring me from using Texter, a freeware text-replacer software, properly.
    Any idea?
    Thanks.

  • Websites won't save in history

    Hi,  I've owned my new computer for roughly 3 or 4 months now but the other day my computer stopped saving history of wesites visited.  Not all, but most.  If I go to a new site, it will save the initial page but won't save any consequetive pages on that site.  It saves documents opened etc.... 
    My computer is a HP Model p6731a
    I'm using windows 7 SP1 IE9.
    I've already checked in Internet Options and the 'Delete Browsing History on Exit' button is UNchecked.
    Any help would be appreciated.
    Sandy
    This question was solved.
    View Solution.

    Hi Sandy,
    The Internet Explorer reset will only affect the settings in your Internet Explorer 9 browser. 
    ****Please click on Accept As Solution if a suggestion solves your problem. It helps others facing the same problem to find a solution easily****
    2015 Microsoft MVP - Windows Experience Consumer

  • Why won't FIREFOX save my HISTORY settings of USE CUSTOM settings?!!!

    This is very very annoying. I'm ready to throw this program down the bit bucket.
    I use it to access facebook and play farmville. I need it to REMEMBER things so that every time I load farm ville it doesn't have to get stuff from their server..
    Every time I open fire fox, and go to face book, and load farmville I get a message that says I can load faster if I allow it to store data on my Computer..
    I go to firefox settings and find ONCE AGAIN my History preferences will NOT save "USE CUSTOM SETTINGS".
    I have to change it every time. I have both 32 bit and 64 bit Nightly (beta) versions on my computer.
    I have totally removed both, restarted windows 7, restarted it again, re-installed fire fox and it STILL happens...
    Why? I will be darned if I will use explorer, but at least it SAVES the settings and doesn't get them screwed up!

    ''cor-el [[#answer-664256|said]]''
    <blockquote>
    Don't get confused:
    If you see "(Never) Remember History" then that means that all history and cookie settings are set to the default value (i.e. cookies are enabled).
    The "Use custom settings for history" selection allows to see the current history and cookie settings, but selecting this doesn't make any changes to history and cookie settings.
    Firefox shows "Use custom settings for history" as an indication that at least one of the history and cookie settings is not the default to make you aware that changes were made.
    If all History settings are default then the custom settings are hidden and you see "Firefox will: (Never) Remember History".
    "Never Remember History" means that Private Browsing is active and "Always use private browsing mode" gets a checkmark.
    "Use custom settings for history" stays selected if at least one of the History or Cookie settings is not the default to make you aware that changes from the default setting have been made.
    </blockquote>
    OK so I agree I was confused. What is confusing me even more is the number of times sites tell me I need to set my cookie settings to accept when as far as I can see it already is.

  • Firefox 3.6.3 does not save any history, does not save passwords. I have read the forum and checked my settings (ok), started in Safe mode (still does not work).

    Firefox 3.6.3 does not save history, nor passwords. I have read the forum and checked my settings in Privacy (all ok), I restarted Firefox in Safe mode (it still does not remember history or passwords). Running on XP. I think these problems started when I upgraded to 3.6.3.

    I had the same problem after an upgrade to 3.6.3.
    I was using password manager for a number of web sites before. Not using cookies but password manager.
    After 3.6.3 auto upgrade it did not work.
    I could not enter private browsing mode.
    When I looked in tools>options>security at my saved passwords the list was blank. The button in the saved passwords dialog that normally says "Show saved passwords" was actually blank (the button was there but there was no text on it).
    I did have my old bookmarks and was able to create new ones but oddly the bookmark all tabs menu function wouldn't work.
    I decided to reinstall firefox 3.6.3. There is no way something with that many bugs got out!
    I was able to get the full firefox executable from http://mozilla.com
    I closed all firefox windows and ran the installation.
    After re-running the install and starting firefox everything was fine. It must have been a bad download or the original install got messed up somehow.
    I hope you have the same good fortune I had!

  • Lync 2010 and Outlook 2010 cannot save conversation history

    I have a user that is having issues saving their conversations to Outlook 2010. It is isolated to 1 user and follows that user no matter what machine they log into. They have the feature turned on to save their conversations to outlook and i even see the
    conversation history start to queue up, but it will not get sent to outlook. The issue 2 weeks ago for them and as far as i can tell nothing was done to their account.

    Hi,
    Lync client save the conversation history to outlook through EWS, If the EWS is not possible it will go through MAPI. So please check the user's lync client Configuration Information, make sure the EWS deploy is OK and you can find the EWS URI.
    You also can try to change the EWSFindCountLimit for this user.
    New-ThrottlingPolicy –Name LyncClientPolicy –EWSFindCountLimit $null
    Set-Mailbox -Identity usermailAddress –ThrottlingPolicy LyncClientPolicy
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

  • Communicator 2007 r2 does not save chat history in outlook 2013

    hi ,
    i was using win7 64 bit enterprise edition with outlook 2010 & communicator 2007 r2, whatever i chat everything would be saved in conversation History automatically and every
    was fine. i recently migrated to windows 8 64 bit enterprise edition with outlook 2013 & communicator
    2007 r2. Issue : my chat history does not saves in conversation history , when i click on tools >> option >> personal information manager, is degraded.
    if i try to save it manually that is also grade out.
    can anyone please help to fix this.
    Regards,
    Raghavendra R

    Hi,
    Please make sure you have installed the latest version of communicator.
    I want to confirm if the option has been selected even the PIM section is grayed out.
    Please try to repair Office to test the issue.
    Kent Huang
    TechNet Community Support

  • Since updating Firefox my laptop does not save my history. Where has all my history gone?

    it will save history during the session you are in but when you reopen the browser there is no history saved. can't find anywhere to change it. my other browsers are saving changes, but we prefer to use Firefox but it is too inconvenient at this time.

    -> click '''Firefox''' button and click '''Options''' -> Privacy -> History section -> '''Firefox will: select "Use Custom Settings for History"''' -> '''REMOVE Checkmark from "Permanent Private Browsing mode"''' -> place Checkmarks on:
    1) Remember my Browsing History 2) Remember Download History 3) Remember Search History 4) Accept Cookies from sites -> click '''Exceptions...''' button and click "Remove All Sites" 4a) Accept Third-party Cookies -> ''Keep Until'': '''select They Expire'''
    -> REMOVE CHECKMARK from CLEAR HISTORY WHEN FIREFOX CLOSES
    -> '''When using the Location Bar, suggest: select "History and Bookmarks"'''
    -> go to Tools Menu -> Options -> Security -> place Checkmarks on:
    1) Warn me when sites try to install add-ons 2) Block reported attack sites 3) Block reported web forgeries
    -> click '''Firefox''' button and click '''Options''' -> Advanced -> General -> Remove Checkmark from '''Warn me when websites try to redirect or reload the page'''
    -> click '''Firefox''' button and click '''Options''' -> Advanced -> Network -> Offline Storage (Cache): click '''Clear Now''' button
    -> Click OK on Options window -> Restart Firefox
    Make sure NOT to use '''Clear Recent History''' feature
    * https://support.mozilla.com/en-US/kb/Clear%20Recent%20History
    Check and tell if its working.

Maybe you are looking for

  • Creating "Menu" for AVCHD File

    Is it possible to create a menu file, or something like it, for an AVCHD file?  I am hearing more and more that people want their video projects on flash drives, which is fine.  But the downside is, as far as I can tell, you lose the menu screen when

  • GMS and Windows Phones error 80072F7D

    Hello, after expiration of old SSL certificates we added wildcard certificate from RapidSSL. iPhones and Android phones are happy with that, but all MS Phones getting 80072F7D error, when trying to sync with GMS. We imported SSL certificate from GMS

  • Has anyone else had a control key act stuck?

    I couldn't type in my password the other day after some basic trouble shooting and calling Apple everyone was at their wits end.  Then I saw it, in the lower left of safari in the grey boarder it said "display a menu" a quick search on my phone showe

  • HT4995 is there any way to remotely turn on ipad location services

    how can i turn on a missing ipad location services?

  • DPS web content viewer is caching css...?

    I have noticed that when using web content viewer for use of digital publications it seems that it is caching CSS when I use preview function. This makes it very hard to make css changes. One work around I have found is using inline CSS, but ick...se