First, the history of the command line
Press up and down to traverse the most recently entered command
<CTRL+r> after entering incremental mode
This can be viewed in the previous 2000 history
$ vim ~/.bash_history
Second, edit the command line
- <ctrl k>: Delete the part from the cursor to the end of the line
- <ctrl u>: Delete the part from the cursor to the beginning of the line
- <alt D>: Delete the part from the cursor to the end of the current word
- <ctrl W>: Remove the part from the cursor to the beginning of the current word
- <ctrl A>: Moves the cursor to the beginning of the line
- <ctrl E>: Moves the cursor to the end of the line
- <alt A>: Moves the cursor to the current Word header
- <alt E>: Moves the cursor to the end of the current word
- <ctrl y>: Inserting recently deleted words
Iii. Ordering of commands
Execute the Command1 first, regardless of whether Command1 is wrong, then execute Command2
Command1;command2
Execute Command2 only if Command1 is properly run
Command1 & Command2
Iv. output Redirection
">" is the output redirect , you can save the command output to a file, ">>" and ">" function similarly,
The difference is that ">" is a new or rewritten file, and ">>" appends the content to the end of the file.
Shell Simple to use