Basic Linux Training Tutorials

Source: Internet
Author: User

Linux Basic Training Tutorials

Linux methods for querying the history operation time

To view the operation time of the history record in the Linux operating system, you can do this in the following steps:

Brother Lian Linux Training Basic Tutorials

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:18 Adminll-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:41 Adminhistory | Tail


Basic Linux Training Tutorials

Related Article

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.