Here's a list of the most commonly used wildcards in bash:
| Wildcard | Matches |
| * | zero or more characters |
| ? | exactly one character |
| [abcde] | exactly one character listed |
| [a-e] | exactly one character in the given range |
| [!abcde] | any character that is not listed |
| [!a-e] | any character that is not in the given range |
| {debian,linux} | exactly one entire word in the options given |
You can use wildcards with any command that accepts file names as arguments.
linux下的很多命令,比如 rsync ,scp , tar 都有--exclude的选项参数,PATTERN就是使用bash 的wildcard character.
本文介绍了Bash中常用的通配符及其用法,包括*、?、[]等,并说明了如何将这些通配符应用于诸如rsync、scp、tar等命令的--exclude选项中。
6949

被折叠的 条评论
为什么被折叠?



