让history显示带时间

第一步

echo 'export HISTTIMEFORMAT="%F %T"' >>/etc/profile

 

第二步

source /etc/profile

 

第三步

 

重新执行history命令,发现显示历史命令使用的时间了

 

 

posted @ 2022-03-01 10:36  海月如希  阅读(137)  评论(0)    收藏  举报