Linux entry-based wildcard characters

Source: Internet
Author: User
Tags uppercase letter

Globbing: File name wildcard mechanism (this is the whole file name match, not part of the file name)//Note here refers to the filename

Matching mode:

*: matches any character of any length

pa*: All files starting with PA, *pa*,*pa,*pa*a* pa,paa,passwd

?: matches any single character pa??? Pa,p?a,p?a? PA (not compliant with PA?), paa,passwd

[]: matches any single character within the specified range

There are several special mechanisms [A-z] (default is case insensitive), [A-z] (default is case insensitive), [0-9],[a-z0-9][[:upper:]]: All uppercase letters//only match one uppercase letter

[[: Lower:]]: All lowercase letters

[[: Alpha:]]: All letters

[[:d Igit:]]: All numbers

[[: Alnum:]]: All letters and numbers

[[: Space:]]: all whitespace characters

[[:p UNCT:]]: all punctuation characters

[^]: matches any single character outside the specified range

[^[:upper:]]: Match non-uppercase characters

[^0-9]: matches any non-numeric character

[^[:alnum:]]: matches any non-normal character

Note The writing format two curly braces are in a specific format, and wildcards can be used to quickly and efficiently find and match any letter and number as well as punctuation.

This article is from the Linux Entry Basics blog, so be sure to keep this source http://37003839.blog.51cto.com/12378898/1982950

Linux entry-based wildcard characters

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.