When using command lines, there is a lot of time to find the files you need, such as LS find. S h e l L provides a complete set of string pattern matching rules, or meta-characters, when S-H-L encounters the above characters, it treats them as special characters rather than ordinary characters in the file name, so that the user can use them to match the corresponding file names, which I understand can be called wildcards.
wildcard characters and regular expressions are different, simple: wildcard is used to match, the regular expression is used for matching strings, in the text Filter tool, are used regular expressions, such as awk,sed, etc., is for the content of the file. Wildcard characters are used in filenames, such as finding FIND,LS,CP, and so on. Second, the shell has a difference between the wildcard and the regular expression, "" is generally a wildcard character (is the shell itself extraction processing), "is usually a regular expression (the shell will pass the data to other command processing).
The following is a wildcard character in the usual sense:
* matches any string in the file name, including an empty string.
? Matches any single character in the file name.
[...] Matches any of the characters contained in [].
[!...] Match [] Non-exclamation! The character after.
Such as:
All strings starting with 5* 5
All strings ending in 5
A. A string with a second-to-last character of 5
[0-9] all characters with numbers
[1] or 2
[!0-9] is not a numeric character
ls/etc/[!a-n]*.conf lists files in the/etc/directory that do not start with the letters A through n and end with. conf
ls/etc/[a-n]*.conf lists files in the/etc/directory that begin with the letters A through n and end with. conf
ls/bin/[ck]* lists filenames that begin with C or K
Linux wildcard characters