* matches any character of any length
? Match any single character
[0-9] Match all numbers
[] matches any single character within the specified range
[^] matches any single character outside the specified range
[WXC] matches any one of the characters in the list
[^WXC] matches characters other than all characters in the list
Pre-defined character classes: #man 7 glob
[[:d Igit:]]: Any number, equivalent to 0-9
[[: Lower:]]: Any lowercase letter
[[: Upper:]]: Any uppercase letter
[[: Alpha:]]: Any uppercase or lowercase letter (including case)
[[: Alnum:]]: any number or letter
[[: Space:]]: Spaces and tabs
[[:p UNCT:]]: punctuation
Matches any single character outside the specified range
[^[:upper]]
[^0-9]
[^[:alnum]]
Practice:
1. Display all files or directories with L, ending with a lowercase letter, and with at least one digit in the middle of the/var directory
Ls/var/l*[0-9]*[[:lower]]
2. display files or directories that start with any digit in the/etc directory and end with a non-digit
LS/ETC/[0-9]*[^0-9]
3, display/etc/directory with a non-letter beginning, followed by a letter and any other arbitrary length of any character file or directory
ls/etc/[^[:alpha:]][[:alpha:]]*
4. Display all files or directories in/etc that start with a non-numeric end of M
LS/ETC/M*[^0-9]
5. Display all files or directories ending with. D in the/etc directory
Ls/etc/*.d
6. Display the files or directories with the end of. conf and beginning with m,n,r,p in the/etc directory
Ls/etc/[mnrp]*.conf
Shell script Programming wildcard characters