|
|
发表于 2006-2-10 23:50:32
|
显示全部楼层
在 /etc/profile 文件里加上:
HISTFILE=~/.bash_history
HISTSIZE=10000
HISTFILESIZE=999999
# Don't let the users enter commands that are ignored
# in the history file
HISTIGNORE=""
HISTCONTROL=""
readonly HISTFILE
readonly HISTSIZE
readonly HISTFILESIZE
readonly HISTIGNORE
readonly HISTCONTROL
export HISTFILE HISTSIZE HISTFILESIZE HISTIGNORE HISTCONTROL
这里 ~/.bash_history 记录了用户在终端下的所有命令。不包括GUI操作。 |
|