Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

Bash logging from multiple terminals

  • 22-08-2006 12:10PM
    #1
    Registered Users, Registered Users 2 Posts: 37,485 ✭✭✭✭


    This is for my own benefit...I sometimes come up with genius commands that I completely forget later (I'm very inventive, but very forgetful :D)....what I'd like to do is have every command from every bash shell appended to the .bash_history (or any file in fact). ATM, it's a bit hit and miss if I have more than one terminal open....some go in....some don't.

    Suggestions?


Comments

  • Closed Accounts Posts: 7,562 ✭✭✭leeroybrown


    Check if the 'histappend' shell option is enabled:
    shopt histappend
    

    If not you can set it as follows:
    shopt -s histappend
    

    This shell option controls whether the history file is overwiritten or appended to when a shell exits.


  • Registered Users, Registered Users 2 Posts: 37,485 ✭✭✭✭Khannie


    Nice one. Cheers. It was off.


  • Registered Users, Registered Users 2 Posts: 1,865 ✭✭✭Syth


    You can also have bash append the command to the HISTFILE after the command was entered, as opposed to when you log out.

    This is an interesting power-bash guide


  • Registered Users, Registered Users 2 Posts: 37,485 ✭✭✭✭Khannie


    ROFL
    Target audience: people who type things in Linux

    Thanks syth.


Advertisement