In linux, how does one view the history operation time? Here we will share the specific implementation methods. if you need them, please refer to them.
To view the operation time of the history record in a linux operating system, follow these steps:
1. modify the/etc/profile file and add: export histtimeformat = "% f % t 'whoam'" at the end '"
2. in the user directory, modify the file. bash_profile and add export histtimeformat = "% f % t 'whoam '"
Log out of the terminal and log on again.
For example, view the history operation time:
Copy codeThe code is as follows:
[Root @ jb51 ~] $ History | tail
989 19:06:04 admin vi. bash_profile
990 22:06:03 admin ll
991 22:06:09 admin vi. bash_profile
992 22:06:18 admin ll-ag
993 22:06:55 admin history | tail
994 22:07:11 admin vi. bash_profile
995 22:07:24 admin history | tail
996 22:07:32 admin eixt
997 22:07:35 admin exit
998 22:07:41 admin history | tail