Special symbols in the shell

Source: Internet
Author: User

* Wildcard character (* for 0 or more arbitrary characters)

[[email protected] ~]# ls *.txt

A.txt

1. txt:

2. txt:

? Represents only one arbitrary character

[email protected] ~]# Touch Testa[[email protected] ~]# touch Testb.txt[[email protected] ~]# ls-d test?test1 test2 tes T3 Testa

# This symbol in Linux indicates the meaning of the comment description, that is, the content behind the # Linux ignored.

[Email protected] ~]# abc=123 #aaaaa [[email protected] ~]# echo $ABC 123

\ de-ideographic character, restores the following special symbol (for example "*") to normal characters.

[[email protected] ~]# touch \ #1. Txt[[email protected] ~]# ls1,ipt #1. txt 2.txt a.txt INSTALL.LOG.SYSL Og1.ipt 1.txt anaconda-ks.cfg install.log pv[[email protected] ~]# ls \ #1. txt#1.txt


| The pipe character, which appears several times before, is the function of dropping the result of the preceding command to the command following the symbol

[email protected] ~]# cat Log.log |wc-l4

$ variable prefix (when you get, use the variable, add the symbol)
; Often used in the middle of two commands such as: LS 1.txt; LS 2.txt
~ User Home Directory
& Throw a command to the background such as: Sleep &
> Redirect >> Chase-weighted redirect 2> error redirect 2>> error append redirect
< Reverse redirect (the contents of the right document are redirected to the left command, such as Wc-l < 1.txt)
[] Two command set ls [12].txt equals ls 1.txt 2.txt regular expression is often used to define the range







This article is from "Linux rookie" blog, please be sure to keep this source http://490617581.blog.51cto.com/11186315/1759941

Special symbols in the shell

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.