Created
October 23, 2015 14:24
-
-
Save trajakovic/38bae83c8eb3fc7ee6cf to your computer and use it in GitHub Desktop.
Fedora/unlimited_bash_history
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
#!/usr/bin/env bash | |
func_check_for_root() { | |
if [ ! $( id -u ) -eq 0 ]; then | |
echo "ERROR: $0 Must be run as root, Script terminating" ;exit 7 | |
fi | |
} | |
func_check_for_root | |
cat <<_EOF_ | sudo tee /etc/profile.d/bash_unlimited_history.sh | |
HISTFILESIZE=1000000000 | |
HISTSIZE=1000000 | |
HISTTIMEFORMAT='%F %T ' | |
export HISTFILESIZE HISTSIZE HISTTIMEFORMAT | |
_EOF_ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
run this with
`wget -qO- https://gist.githubusercontent.com/trajakovic/38bae83c8eb3fc7ee6cf/raw/unlimited_bash_history.sh|sudo bash
and then reopen terminal or run
source /etc/profile.d/unlimited_bash_history.sh