The usage of Linux!

Source: Internet
Author: User

! Use of:
1 、!! : Represents the previous command, as follows:
Example one:
Cat!! (equivalent to Cat./some-shell-command)
Example two:
!! (equivalent to Cd/user)
2.!$: Represents the last parameter in the previous command, as follows:
Example one:
CD!$ (equivalent to Cd/user)
3.!STR: Represents the most recent command in the history command that begins with STR, as follows:
Example one:
!STR (equivalent to ipconfig)
4 、!? STR: Represents the most recent command in the history command that contains STR, as follows:
Example one:
!? /usr?
5,!n and!-n: The former represents the history command, which shows the previous number of entries as N, which represents the last Nth command in the historical command line. The former is the nth of the historical command line, and the latter is the last nth.
6, re-execute the previous name has the following methods:
Use the UP ARROW key and enter to execute.
By!! and enter the execution.
Enter!-1 and return to execute.
Press Ctrl+p and enter to execute.

The usage of Linux!

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: 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.