List of patterns to control what’s saved in the history

$HISTIGNORE is a colon-separated list of patterns. Commands, which are matched by one of the patterns, are excluded from the history and not stored.

Ignored commands are removed from history and also can’t be recalled with the UP or DOWN keys.

Examples

Exclude history and any sudo command from your history: :

1
export HISTIGNORE='history:sudo*'
BashSupport Pro 是一个 支持 $HISTIGNORE 的 Bash 集成开发工具 – 马上试用!
© 2020–2022 Joachim Ansorg
声明
隐私政策
许可条款