Shell wildcards, regular expressions, and regular expressions

Source: Internet
Author: User

Shell wildcards, regular expressions, and regular expressions can be used in Shell. Common Wildcards are as follows: ●? Represents any single character. ● * represents any string of any length. ● [] represents a string that matches any character set in []. ● {} the strings in braces are separated by commas. Www.2cto.com Declaration: All files in the following display directory do not include recursion. Example 1: show all files starting with apache _ in the current directory # ls apache _ * Example 2: show all files ending with. txt # ls *. txt Example 3: show all files starting with 23 with only three strings # ls 23? Example 4: show all files starting with 23 and ending with a number with only three strings # ls 23 [0-9] example 5: Show cake.docand cars.doc # ls caw.ke, rsw..doc

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.