Skip to content

Instantly share code, notes, and snippets.

@trajakovic
Created October 23, 2015 14:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save trajakovic/38bae83c8eb3fc7ee6cf to your computer and use it in GitHub Desktop.
Save trajakovic/38bae83c8eb3fc7ee6cf to your computer and use it in GitHub Desktop.
Fedora/unlimited_bash_history
#!/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_
@trajakovic
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment