配置环境变量,实现执行history的时候可以看到执行命令的时间

执行步骤

在~/.bash_profile中新增一行,写入:HISTTIMEFORMAT='%F_%T ',保存退出。

1、vim .bash_profile

2、增加一行,保存退出

3、查看效果

原文地址:https://www.cnblogs.com/qiaokaixin/p/14344891.html