History(历史)命令用法 - 使用 HISTIGNORE 忽略历史中的特定

下面的例子,将忽略 pwd、ls、ls -ltr 等命令:[code]# export HISTIGNORE=”pwd:ls:ls -ltr:”

pwd

ls

ls -ltr

service httpd stop

history | tail -3

79 export HISTIGNORE=”pwd:ls:ls -ltr:”
80 service httpd stop
81 history
[Note that history did not record pwd, ls and ls -ltr][/code]