先日、colinux環境を壊してしまった際、.bashrcの設定漏れがあったのでメモ。
.bashrcの抜粋
export HISTCONTROL=erasedups #ignoredups,ignorespace,erasedups export HISTIGNORE=cd:history:ls:which #you can use wild cart(*,?)
HISTCONTROLの仕様
ignoredups | 同じコマンドが連続した場合、historyに記録しません |
ignorespace | 空白で始まるコマンドはhistoryに記録しません |
erasedups | 全履歴に渡り重複コマンドを削除します |
参考 http://www.gnu.org/software/bash/manual/bash.html#Bash-Variables