Many people will use the history of this command, which means to list all the actions of the current user (by default), but many distributions of the default history is no user and operation time, this is necessary to view the original operation of the content of the time to provide trouble, man The next history, found that there is a variable can be set to the history of this display format, this variable is Histtimeformat
Just execute the following command:
Export histtimeformat= "' WhoAmI ': | %F | %T: | "
Then you can see the history with the user and time, save this to the current user's. Bash_profile inside, you can boot automatically loaded
The following is the display effect:
330 root : | 2012-08-24 | 17:47:12: | yum search nfs 331 root : | 2012-08-24 | 17:47:12: | yum install nfs4-acl-tools 332 root : | 2012-08-24 | 17:47:12: | nfsiostat 333 root : | 2012-08-24 | 17:47:12: | nfs4_editfacl 334 root : | 2012-08-24 | 17:47:12: | nfs4_editfacl -- help 335 root : | 2012-08-24 | 17:47:12: | man nfs4_editfacl 336 root : | 2012-08-24 | 17:47:12: | nfs4_getfacl 337 root : | 2012-08-24 | 17:47:12: | nfs4_getfacl -h 338 root : | 2012-08-24 | 17:47:12: | nfs4_getfacl -h 339 root : | 2012-08-24 | 17:47:12: | nfs4_getfacl -H 340 root : | 2012-08-24 | 17:47:12: | ls 341 Root : | 2012-08-24 | 17:47:12: | ifconfig
It's not bad.
This article is from the "Boyhack" blog, make sure to keep this source http://461205160.blog.51cto.com/274918/1722781
Let the Linux History command show the operation time