查看命令历史的时间戳
export HISTTIMEFORMAT=’%F %T ‘
history
2008-12-11 18:01:22 service iptables start
2008-12-11 18:01:36 service mysqld start
清除所有命令历史
history -c
忽略特定命令
export HISTIGNORE=”pwd:ls:ll:”
我的~/.bash_profile
HISTSIZE=9999 HISTFILESIZE=9999 HISTFILE=/root/.history export HISTTIMEFORMAT='%F %T ' export HISTCONTROL=ignoredups export HISTIGNORE="ll:ls" |