linux 历史命令修改

一 添加历史命令时间和用户

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

二 修改保存条数

sed -i s/HISTSIZE=.*/HISTSIZE=90000/g /etc/profile
source /etc/profile

 

posted @ 2020-08-13 16:22  杰克马001  阅读(238)  评论(0编辑  收藏  举报