linux ubuntu查看执行的命令历史记录 history

$ 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

猜你喜欢

转载自blog.csdn.net/qxqxqzzz/article/details/107743076