[Linux] history displays the command execution time, linuxhistory
Display the time of a historical command line
The environment here is centos5.8
Vim ~ /. Bashrc or ~ /. Bash_profile add export HISTTIMEFORMAT = "% F % T"
Execute one session first
Export HISTTIMEFORMAT = "% F % T"
Then run the history command.
# History 500 | grep get_charge_by_month 1002 2014-09-02 10:17:34 history-500 | grep get_charge_by_month 1005 2014-09-02 10:26:41 history 500 | grep get_charge_by_month
This article is from the "orangleliu notebook" blog, please be sure to keep this http://blog.csdn.net/orangleliu/article/details/39002745
Linux history can view commands that have been executed in history. How can I view the command execution time?
Today, the Command records executed yesterday are definitely unavailable. The command records are released and will not be saved unless otherwise saved.
View the execution time of historical commands in linux
It is displayed only after you join
Export HISTTIMEFORMAT = '% F % t' try this