且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

为history加时间戳

更新时间:2022-09-09 22:35:03

echo HISTTIMEFORMAT = "%h%d - %H:%M:%S " >>/etc/profile

重新登录即可

 

(w | grep `ps | grep ps | awk '{ print $2 }'` | awk '{ print $3 }')

 

 

HISTFILE=.bash_history_$(w | grep `ps|grep ps|awk '{print $2}'`|awk '{print $3}')