Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Centos History command history add execution time

2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/03 Report--

Centos History command history add execution time Add the following environment variable to the end of/etc/profile export HISTTIMEFORMAT ='% F %T'

Executing environment variables takes effect source /etc/profile test results [root@localhost network-scripts]# history 1 2019-12-06 13:57:01 free -m 2 2019-12-06 13:57:32 cat /proc/cpuinfo 3 2019-12-06 13:57:39 top 4 2019-12-06 13:58:19 ll 5 2019-12-06 13:58:27 cd /etc/sysconfig/network-scripts/ 6 2019-12-06 13:58:27 ls 7 2019-12-06 13:58:28 ll 8 2019-12-06 13:58:41 ip addr 9 2019-12-06 13:58:46 vim ifcfg-em1 10 2019-12-06 13:58:51 yum install vim -y 11 2019-12-06 14:01:23 history 12 2019-12-06 14:04:15 vim /etc/profile 13 2019-12-06 14:04:48 source /etc/profile 14 2019-12-06 14:04:50 history 15 2019-12-06 14:05:13 vim /etc/profile 16 2019-12-06 14:05:22 source /etc/profile 17 2019-12-06 14:05:23 history [root@localhost network-scripts]# #command interval can be adjusted when defining environment variables

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report