Linux back to last directory with history command find shortcut

Source: Internet
Author: User
Tags clear screen

# CD-
Go to last access directory

Second, the History command search operation shortcut key:
[Ctrl + R], [Ctrl + P], [Ctrl + N]

In the terminal, press the [Ctrl] key while the [R] key, there is a hint: (Reverse-i-search),
At this point you try to enter the commands you have entered previously, and when you enter a character, the terminal will scroll through your history commands.
When the appropriate history command is displayed to you, direct [Enter] executes the history command.

In addition, [Ctrl + P] or [Ctrl + N] quickly scroll forward or backward to find a history command,
It is useful for quick extraction of commands that have just been executed shortly.

Three, command-line fast operation key
1. Mobile Operation shortcut Keys
Ctrl + f--moves one character to the right, of course most people use →
Ctrl + b--moves one character to the left and most people use ←
ESC + f--moves one word to the right, and the Mac suggests Alt +→
ESC + b--moves one word to the left, and Alt +← is recommended for Mac
Ctrl + a--jumps to the beginning of the line
Ctrl + e--jumps to the end of the line

2. Delete operation shortcut keys
Ctrl + d--Remove one character to the right
Ctrl + h--Remove one character to the left
Ctrl + u--Delete the current position character to the beginning of the line (use this more when you enter the wrong password)
Ctrl + k--Delete the current position character to the end of the line
Ctrl + w--Delete from the cursor to the beginning of the current word

3. Other Operation shortcut keys
Ctrl + y--Insert recently deleted words
Ctrl + c--Terminate operation
Ctrl + d--Current action go to background
Ctrl + l--Clear screen (sometimes for good looks)

Linux back to last directory with history command find shortcut

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