Shell Basics (1)

Source: Internet
Author: User
Tags aliases

8.1 Shell introduces a simple point of understanding, is the system with the computer hardware to use intermediate media, it is only a tool of the system. In fact, there is a layer of stuff between the shell and the computer hardware that is the system kernel. For example, if computer hardware is compared to a person's body, and the system kernel is the human brain, as for the shell, it is more appropriate to compare it to a person's facial features. Back to the computer, the user is not directly facing the computer hardware but the shell, the user tells the shell, and then the shell again to the system kernel, and then the kernel to control the computer hardware to perform various operations. 8.2 Command history commands are saved in the. bash_history file in the user's home directory. One thing you need to know is that the commands that run in the current shell are saved to the. bash_history file only when the user exits the current shell normally.!!  Two consecutive '! ', indicating the execution of the previous instruction!n here n is a number, indicating the execution of the nth instruction in the command history, for example,!1002 represents the 1002th command in the history of the execution Command! string (string greater than or equal to 1), for example!PW represents the last instruction in the command history to begin with ' PW '. 8.3 command completion and aliases a simple and easy-to-remember instruction by using alias to make a common and long instruction aliases. If you don't want to use it, you can also use Unalias to remove the alias feature. Directly knocking alias will see the current system preset Alias.alias vip= ' Ls-la ' unalias VIP 8.4 wildcard * is any character? Is any one of the characters [0-3] means 0 1 2 3 [0-9a-za-z] means all letters and numbers {A-Z} means 1 or 2 or 3 8.5 input-output redirection 2> put the wrong information in the file 2>> add the wrong information to the file >+2> = &> right and wrong combination is &> can put the correct and error zones, shell script using the comparison of multiple input redirection Wc-l < 1.txt This file input to the previous command, generally do not

Shell Basics (1)

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.