Created
October 18, 2018 11:27
-
-
Save grantpullen/476dbef89e89138fd1e556fc215c582d to your computer and use it in GitHub Desktop.
Bash history with multiple terminals open saved.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Add line below to /root/.bashrc or required acconut under /home/user/.bashrc | |
export HISTSIZE=50000 | |
# Maximum number of history lines on disk | |
export HISTFILESIZE=50000 | |
# After each command, append to the history file | |
# and reread it | |
export PROMPT_COMMAND="${PROMPT_COMMAND:+$PROMPT_COMMAND$'\n'}history -a; history -c; history -r" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment