To view the operation time of the history record in the Linux operating system, you can do this in the following steps:
Learn Linux
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:18admin Ll-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:41admin History | Tail
Linux Basic tutorial How to query the history operation time under Linux