在/etc/profile 中加入 export HISTTIMEFORMAT="%Y-%m-%d %H:%M:%S "
source /etc/profile
可使用last+history判断是谁执行的某条命令
last 历史登录的ip
history 历史操作记录
本文介绍如何在Linux系统中配置Shell历史命令的时间格式,并利用last和history命令来追踪历史登录信息及操作记录。
在/etc/profile 中加入 export HISTTIMEFORMAT="%Y-%m-%d %H:%M:%S "
source /etc/profile
可使用last+history判断是谁执行的某条命令
last 历史登录的ip
history 历史操作记录

被折叠的 条评论
为什么被折叠?