Shell utility features (summary)

Source: Internet
Author: User

1. Command history:
By pressing the UP ARROW key, you can traverse backward through the most recently entered command under the console, and by pressing the DOWN ARROW key, you can traverse the command you recently entered under the console.
You can also traverse past output in this console with the SHIFT key. You can also edit the old command and then run it.

2. [!$]: Repeat the last parameter of the previous command
Example: [~]# cd/root
[~]# CD!$
[~]# Cd/root

3. Arrangement of commands: (1) use arrange ";" Execute two commands at the same time
                      (2) Use the Arrange "&&" to execute the first command correctly before proceeding to the next command
                      (3) Using piping "|" You can use the output information of the previous command as input to the next command
4.  command alias: syntax: alias [alias]=[Command] Example: # alias ok= "ls-l/boot"   Special instructions: There are spaces in the command, you need to quote.
                   Alias: Syntax: Unalias [Aliases] Example: #unalias ok 
5. Wildcard: "*" can match one or more characters; "?" Can only represent one character.

6. redirect Files 5 ways:
(1) Output redirection, the output of the command command is saved to the file, and if the same file exists, the content command syntax for the file is overwritten: command > File
(2) Enter the redirect, the contents of the file will be the input command syntax of the commands command: command < file
(3) Error redirection, the command command execution error message output to the file in the order syntax: commands 2> file
(4) Append redirect, the output of command command execution is added to the file that already exists. Commands syntax: Order >> file
(5) Simultaneous output and error redirection, the ability to simultaneously implement output redirection and Error redirection commands syntax: command &> file

Shell utility features (summary)

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.