[Linux]history shows when the command was executed

Source: Internet
Author: User

Show the line time of the history command

The environment here is centos5.8

[Python]View PlainCopyprint?
    1. Vim ~/.BASHRC or ~/.bash_profile
    2. Increase
    3. Export histtimeformat="%F%T"


One session is executed first.
[Python]View PlainCopyprint?
    1. Export histtimeformat="%F%T"

And then you can use the history command.

[Python]View PlainCopyprint?
    1. # History 500|grep Get_charge_by_month
    2. 1002 2014-09-: : History-500|grep get_charge_by_month /c5>
    3. 1005 2014-09-: The history 500|grep get_charge_by_month

This article is from the "Orangleliu Notebook" blog, be sure to keep this source http://blog.csdn.net/orangleliu/article/details/39002745

[Linux]history shows when the command was executed

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.