$ history
设置显示的格式、行数:
$ sudo nano /etc/profule
加入
HISTTIMEFORMAT="%F %T `whoami` " # prefix of output
HISTSIZE=5000 # lines num in output of history command
HISTFILESIZE=5000 # lines num in .bash_history file
# 生效
$ source /etc/profile
$ history
设置显示的格式、行数:
$ sudo nano /etc/profule
加入
HISTTIMEFORMAT="%F %T `whoami` " # prefix of output
HISTSIZE=5000 # lines num in output of history command
HISTFILESIZE=5000 # lines num in .bash_history file
# 生效
$ source /etc/profile