linux history 增加时间戳

为了方便查看脚本使用记录,为history 增加时间戳。

vim  /etc/profile

在最底端,增加下面一行代码:

export HISTTIMEFORMAT="%F %T " 

保存完毕后,使用下面的方式,使之快速生效:

source /etc/profile

posted @ 2022-07-05 14:31  胖胖123  阅读(232)  评论(0编辑  收藏  举报