"Learning Notes" shell wildcard, character set, character set extension

Source: Internet
Author: User

Wildcard characters:

The so-called wildcard, refers to the time a file name style, can be used to compare the file name to find the matching files.

*: Represents an arbitrary string, which can be an empty string

? : Represents a character, but cannot be considered empty

Example: List all the files under/usr/bin

ls-la/usr/bin/*

Lists files under/usr/bin with a file name length of 4:

ls-la/usr/bin/????

Character Set:

The symbol for the character set is the bracket: []

[A-Z]:

[A-Z]:

[0-9]

[A-za-z]

[A-za-z0-9]

The symbol for the bracket extension is {} and its purpose is to combine strings.

For example {G,NC,S}FTP represents the string enumerated in {}, which is combined with FTP, respectively. She represents Gftp,ncftp,sftp.

"Learning Notes" shell wildcard, character set, character set extension

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.