Linux ShellLittle-known secrets in command lines
/* Pass the test in linux */
One day, you wrote a very long command.
$ Echo oooooooooooooooooooooooooooooooooooooooooooo
You suddenly don't want to execute it, and you want to delete the entire command, you keep pressing? Too inefficient.
One day, you suddenly forgot a super-long command you typed in the shell. What should you do? Too inefficient.
Take a look at the following content:
CTRL + a -- equivalent to the key
CTRL + e -- equivalent to the key
CTRL + x -- if you press twice in a row, the beginning and the end will alternate.
CTRL + m -- after entering the command, this action is equivalent to pressing
CTRL + j -- after entering the command, this action is equivalent to pressing
CTRL + o -- after the command is entered, this action is equivalent to pressing. The difference is that when you press CTRL + o, he will remember the last command of CTRL + o.
CTRL + c -- discard all content in the previous line and start the next line again
CTRL + u -- delete all letters before the cursor
CTRL + k -- delete all letters after the cursor
CTRL + w -- delete a word pointed by the cursor (from the cursor to the beginning of the word)
CTRL + y -- paste. The clipboard content is CTRL + u or CTRL + u.
CTRL + d -- equivalent
CTRL + h -- equivalent
CTRL + B -- equivalent
CTRL + f -- equivalent
CTRL + l -- equivalent to executing the clear screen command
CTRL + r -- search for the commands you typed forward
CTRL + p -- run the preceding command
CTRL + t -- it's fun to move a letter forward, haha
CTRL + s -- if you do not want the current terminal, try it.