添加时间

在/etc/profile 添加如下两行 

source /etc/profile  重新加载配置文件

HISTTIMEFORMAT="%Y-%m-%d %H:%M:%S "
export HISTTIMEFORMAT
[root@itpuxbbdb54 /]# 
[root@itpuxbbdb54 /]# source /etc/profile
[root@itpuxbbdb54 /]# 
[root@itpuxbbdb54 /]# 
[root@itpuxbbdb54 /]# history 
    1  2022-05-10 20:01:29 cd /etc/sysconfig/network-scripts/
    2  2022-05-10 20:01:29 ls

修改记录数

/etc/profile文件中找到配置项HISTSIZE,默认值为1000

 

 

 

 posted on 2022-05-10 21:05  哦吼厉害哟  阅读(179)  评论(0)    收藏  举报