...
100 ls
101 cat /etc/hosts
...
2.解决无法记录时间的问题(可加入系统的优化)
export HISTTIMEFORMAT="%F %T `whoami` "
全局:echo 'export HISTTIMEFORMAT="%F %T `whoami` "' >> /etc/profile
局部:echo 'export HISTTIMEFORMAT="%F %T `whoami` "' >> ~/.bashrc
3.现在的记录情况
...
100 2013-04-08 08:11:24 root ls
101 2013-04-08 08:11:34 root cat /etc/hosts
...
4.内容的格式
序号 时间 用户 命令
注:以上的内容,对原先的history小技巧(不含{}):{!序号}、{!命令}、{!!},不会有任何的影响。