Quick use of Linux History commands

Source: Internet
Author: User

Use history {$ num} to view the recently used $ num commands. The default value is 500;

1. CTRL + R: (reverse-I-search, the terminal will scroll to display your History commands. When you find the appropriate historical command, you can directly [enter] and run the historical command.

2. Use '! ':
"Success, success": Type !! (Called "progress, progress") to execute the last command in history.
"Digit number": type! Number (for example! 302) will execute 302nd items in the command history file.
"Pipeline string": type! String (such! Rpm) will execute the command that matches the latest near output of the string in the command line.

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.