为history加时间戳

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}')

你可能感兴趣的:(为history加时间戳)