vi ~/.bashrc HISTTIMEFORMAT="%Y%m%d-%H%M%S:::" export HISTTIMEFORMAT source ~/.bashrc 转载于:https://blog.51cto.com/lengxuezhixuan/1322300