[Linux] history displays the command execution time, linuxhistory

Source: Internet
Author: User

[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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.