history历史命令,以年-月-日 时:分:秒 用户名:执行命令的格式记录

1、编辑全局配置文件:/etc/profile

#vi  /etc/profile

export HISTTIMEFORMAT="%F %T `whoami`:"

2、让配置立即生效:

#source  /etc/profile

3、验证配置是否生效:

#history

 

posted @ 2019-04-19 11:01  陪你短发到~长裙落地~  阅读(184)  评论(0编辑  收藏  举报