Linux Basic Training Tutorials
Linux methods for querying the history operation time
To view the operation time of the history record in the Linux operating system, you can do this in the following steps:
Brother Lian Linux Training Basic Tutorials
1, modify the/etc/profile file, add at the end: exporthisttimeformat= "%f%t ' WhoAmI '"
2, or in the user directory, modify the file. Bash_profile, add export histtimeformat= "%f%t ' WhoAmI '"
Exit the terminal and log back in.
example, check the history operation time:
Copy the code code as follows:
[Email protected] ~]$ history |tail
989 2013-06-24 19:06:04admin Vi. bash_profile
990 2013-06-24 22:06:03admin LL
991 2013-06-24 22:06:09admin Vi. bash_profile
992 2013-06-24 22:06:18 Adminll-ag
993 2013-06-24 22:06:55admin History | Tail
994 2013-06-24 22:07:11admin Vi. bash_profile
995 2013-06-24 22:07:24admin History | Tail
996 2013-06-24 22:07:32admin Eixt
997 2013-06-24 22:07:35admin Exit
998 2013-06-24 22:07:41 Adminhistory | Tail
Basic Linux Training Tutorials