From e6cae908d07ef35374919883c9aa868fb86600cc Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Thu, 18 Aug 2016 15:45:51 +1200 Subject: Drastically limit amount of history kept Reading really large files seems to be slow in Bash in general, but it's particularly bad in 4.4rc1. I keep encrypted snapshots of my HISTFILE on my home machine, so it's just a little extra step to search them. --- bash/bashrc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'bash/bashrc') diff --git a/bash/bashrc b/bash/bashrc index 220ecec6..7defd85d 100644 --- a/bash/bashrc +++ b/bash/bashrc @@ -19,11 +19,11 @@ if shopt -q restricted_shell ; then return fi -# Keep around sixteen million lines of history in file -HISTFILESIZE=$((1 << 24)) +# Keep around four thousand lines of history in file +HISTFILESIZE=$((1 << 12)) -# Keep around four thousand lines of history in memory -HISTSIZE=$((1 << 12)) +# Keep around one thousand lines of history in memory +HISTSIZE=$((1 << 10)) # Ignore duplicate commands and whitespace in history HISTCONTROL=ignoreboth -- cgit v1.2.3