tips-history添加命令的执行时间

history添加命令的执行时间

操作步骤

]# vim /etc/profile
...省略,直接在最后一行添加
export HISTTIMEFORMAT="%Y-%m-%d %H:%M:%S "

#退出当前shell,重新进入
]# history
...
  898  2020-07-19 10:23:31 env
  899  2020-07-19 10:23:31 vim /etc/profile
  900  2020-07-19 10:23:35 history
posted @ 2020-06-23 10:33  wanwz  阅读(79)  评论(0编辑  收藏  举报