通配符
Attention:
The 1.linux wildcard is different from The Three Musketeers (grep, SED, awk) Regular expressions, therefore, the meaning of the representative is also a big difference
2. Wildcard characters are typically user command-line bash environments, while Linux regular expressions are used for grep, SED, awk
wildcard characters |
Description |
Degree of importance |
* |
wildcards, which represent arbitrary (unlimited number of characters) characters |
☆☆☆☆☆ |
? |
wildcards, which represent any one character |
☆ |
# |
Configuration file comments |
☆☆☆☆☆ |
|
Pipeline |
☆☆☆☆☆ |
~ |
User's home directory |
☆☆☆☆☆ |
- |
The last directory in which you were located |
☆☆☆☆☆ |
$ |
The symbol to be added before the variable |
☆ |
/ |
Path separator symbol, also the root directory meaning |
☆ |
> or 1> |
Redirect, overwrite old data |
☆☆☆☆☆ |
>> |
Append redirect, append content file trailer |
☆☆☆☆☆ |
< |
Input redirection (Xargs, TR) |
☆☆☆☆☆ |
<< |
Append input redirection (CAT) |
☆ |
‘ |
Single quotes, no variable substitution function, the output is WYSIWYG |
☆☆☆☆☆ |
" |
Double quotes, with variable displacement function, after parsing the variable output, without quotation marks equivalent to double quotes, commonly used double quotes |
☆☆☆☆☆ |
· |
Anti-quotes, two anti-quotes • •, middle for command, will execute first, equivalent to $ () |
☆ |
{} |
The middle is the command block combination or the content sequence |
☆☆☆☆☆ |
! |
"Non" (not) in logical operation |
☆ |
&& |
And and, after the current one instruction executes successfully, the next instruction is executed |
☆ |
|
or the latter, executing the next instruction after the current one instruction fails |
☆ |
. |
Point represents the current directory |
☆☆☆☆☆ |
.. |
Two points represent the previous level of the directory |
☆☆☆☆☆ |
Case one:
Linux wildcard characters