将Linux的history命令定制格式

来源:互联网 发布:《黑白网络》 编辑:程序博客网 时间:2024/05/19 00:07

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

 

或者写入/etc/profile, 然后source /etc/profile

 

 

下面就是输出的格式:

  434  root@2014-03-29 17:27:03 history
  435  root@2014-03-29 17:27:11 export HISTTIMEFORMAT="`whoami`@%F %T "

0 0
原创粉丝点击