Linux uses CTRL + R to find previous (historical) input commands

Source: Internet
Author: User

In the Linux system has been using the upper and lower keys to find the previous input commands, this find just entered the command is very convenient, but more distant command, with the upper and lower key efficiency is not high. The history command is also a showy, although the function is many, but does not use, the net looked under, discovered with the CTRL + R this shortcut key to find the historical order, studied the discovery really to be useful.

After pressing this shortcut, enter the reverse search state, when you enter a character, the system will find the most recent command containing this character, if it is not the command you want, you can continue to input, the system continues to find the most recent command that contains the string you entered until you find the command you want.

After you find the command you want, you can press ENTER to execute this command, you can press the up and down keys to find the command before and after the command, press the left and right keys to move the cursor and modify the command.

To improve your search efficiency, you should enter the most specific character in the command (other characters not included in the command)

For example, I'm looking for a command that I've recently entered for background execution: Nohup./bzimpx.sh >/dev/null &

Just enter the & symbol and you'll find this command.

Linux uses CTRL + R to find previous (historical) input commands

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.