Run quick commands in CentOS 6.6

Source: Internet
Author: User

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

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.