Run quick commands in CentOS 6.6
How to Use CentOS quick commands
1 ,! $ The last parameter of the previous command. You do not need to enter the long parameter again.
For example:
[Root @ localhost ~] # Cat/etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE = eth0
HWADDR = 00: 0C: 29: AA: 77: 84
TYPE = Ethernet
UUID = 7260d0db-35da-43f2-a0bd-c2d4edc24db2
ONBOOT = yes
NM_CONTROLLED = yes
BOOTPROTO = none
IPADDR = 192.168.20.10
NETMASK = 255.255.255.0
GATEWAY = 192.168.20.1
DNS1 = 192.168.1.17
[Root @ localhost ~] # Vi! $! $ Equals/etc/sysconfig/network-scripts/ifcfg-eth0
Vi/etc/sysconfig/network-scripts/ifcfg-eth0
2 ,! File Name or! Command to execute the latest command that starts with a file name or command. You do not need to input long commands or long parameters repeatedly;
#! /Etc/run the latest command starting with/etc/
#! Cat runs the latest command starting with cat with no spaces in the middle;
For example:
[Root @ yonglinux ~] # Cat/etc/resolv. conf
; Generated by/sbin/dhclient-script
Nameserver 192.168.1.1
Nameserver 192.168.1.1
[Root @ yonglinux ~] #! Cat
Cat/etc/resolv. conf
; Generated by/sbin/dhclient-script
Nameserver 192.168.1.1
Nameserver 192.168.1.1
3 ,!! Run the previous command
For example:
[Root @ localhost ~] # Uname-r
2.6.32-431. el6.i686
[Root @ localhost ~] #!!
Uname-r
2.6.32-431. el6.i686