root用户修改
[root@localhost ~]# vim /etc/profile
末尾添加以下行:
export HISTTIMEFORMAT="%Y-%m-%d %H:%M:%S "
:wq
[root@localhost ~]# source /etc/profile
history查看;或者退出窗口重新进入,就会显示执行时间。
如下:
[root@localhost ~]# history
1 2016-03-29 05:55:13 cat /etc/hosts
2 2016-03-29 05:55:42 /usr/sbin/ntpdate asia.pool.ntp.org
3 2016-05-04 09:44:37 date
4 2016-05-04 09:44:41 ntpq -p
5 2016-05-04 09:44:46 clear
6 2016-05-04 09:44:56 yum -y install openssl openssl-devel ruby ruby-json
7 2016-05-04 09:47:48 wget http://downloads.puppetlabs.com/facter/facter-2.4.6.tar.gz && tar -zxvf facter-2.4.6.tar.gz && cd facter-2.4.6 && ruby install.rb
8 2016-05-04 09:48:55 cd ../rm -rf facter*
9 2016-05-04 09:49:03 cd ../
10 2016-05-04 09:49:08 rm -rf facter-2.4.6*
11 2016-05-04 09:49:25 yum -y install http://yum.puppetlabs.com/el/6/products/x86_64/hiera-1.3.4-1.el6.noarch.rpm
12 2016-05-04 09:49:47 wget http://downloads.puppetlabs.com/puppet/puppet-3.8.7.tar.gz && tar -zxvf puppet-3.8.7.tar.gz && cd puppet-3.8.7 && ruby install.rb
13 2016-05-04 09:53:01 cp -v conf/auth.conf /etc/puppet/
14 2016-05-04 09:53:13 cp -v ext/redhat/puppet.conf /etc/puppet/
15 2016-05-04 09:53:24 cp -v ext/redhat/client.init /etc/init.d/puppet
16 2016-05-04 09:53:34 chmod +x /etc/init.d/puppet
[root@localhost ~]# vim /etc/profile
末尾添加以下行:
export HISTTIMEFORMAT="%Y-%m-%d %H:%M:%S "
:wq
[root@localhost ~]# source /etc/profile
history查看;或者退出窗口重新进入,就会显示执行时间。
如下:
[root@localhost ~]# history
1 2016-03-29 05:55:13 cat /etc/hosts
2 2016-03-29 05:55:42 /usr/sbin/ntpdate asia.pool.ntp.org
3 2016-05-04 09:44:37 date
4 2016-05-04 09:44:41 ntpq -p
5 2016-05-04 09:44:46 clear
6 2016-05-04 09:44:56 yum -y install openssl openssl-devel ruby ruby-json
7 2016-05-04 09:47:48 wget http://downloads.puppetlabs.com/facter/facter-2.4.6.tar.gz && tar -zxvf facter-2.4.6.tar.gz && cd facter-2.4.6 && ruby install.rb
8 2016-05-04 09:48:55 cd ../rm -rf facter*
9 2016-05-04 09:49:03 cd ../
10 2016-05-04 09:49:08 rm -rf facter-2.4.6*
11 2016-05-04 09:49:25 yum -y install http://yum.puppetlabs.com/el/6/products/x86_64/hiera-1.3.4-1.el6.noarch.rpm
12 2016-05-04 09:49:47 wget http://downloads.puppetlabs.com/puppet/puppet-3.8.7.tar.gz && tar -zxvf puppet-3.8.7.tar.gz && cd puppet-3.8.7 && ruby install.rb
13 2016-05-04 09:53:01 cp -v conf/auth.conf /etc/puppet/
14 2016-05-04 09:53:13 cp -v ext/redhat/puppet.conf /etc/puppet/
15 2016-05-04 09:53:24 cp -v ext/redhat/client.init /etc/init.d/puppet
16 2016-05-04 09:53:34 chmod +x /etc/init.d/puppet
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/9034054/viewspace-2093302/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/9034054/viewspace-2093302/