Wildcard Meaning

Wildcard Description Example
* matches any characters *.html
? matches any single character ?.xml
[characters] matches any character that is a member of the set characters TODO
[!characters] matches any character that is not a member of the set characters TODO
[[:class:]] matches any character that is a member of the specified class TODO

Table 5-2: Commonly Used Character Classes
Character Class Meaning
[:alnum:] Matches any alphanumeric character
[:alpha:] Matches any alphabetic character
[:digit:] Matches any numeral
[:lower:] Matches any lowercase letter
[:upper:] Matches any uppercase letter
Using

Table 5-3: Wildcard Examples
Pattern Matches
* All files
g* Any file beginning with “g”
b*.txt Any file beginning with “b” followed by
any characters and ending with “.txt”
32
Wildcards
Data??? Any file beginning with “Data” followed
by exactly three characters
[abc]* Any file beginning with either an “a”, a
“b”, or a “c”
BACKUP.[0-9][0-9][0-9] Any file beginning with “BACKUP.”
followed by exactly three numerals
[[:upper:]]* Any file beginning with an uppercase letter
[![:digit:]]* Any file not beginning with a numeral
*[[:lower:]123] Any file ending with a lowercase letter or
the numerals “1”, “2”, or “3”