GNU Tar Include and Exclude Behavior
This table represents the results of installcheck/gnutar.pl across multiple GNU Tar versions. Note that this page only deals with include and exclude behavior; see the GNU Tar FAQ entry for other undesirable behaviors.
pat | file | include | exclude | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
no args | -wc | -no-wc | no args | -wc | -no-wc | ||||||||||||||
<1.16 | 1.16-22 | >1.22 | <1.16 | 1.16-22 | >1.22 | <1.16 | 1.16-22 | >1.22 | <1.16 | 1.16-22 | >1.22 | <1.16 | 1.16-22 | >1.22 | <1.16 | 1.16-22 | >1.22 | ||
./A*A | A*A | ||||||||||||||||||
./A*A | AxA | ||||||||||||||||||
./A\*A | A*A | ||||||||||||||||||
./A\*A | AxA | ||||||||||||||||||
./B?B | B?B | ||||||||||||||||||
./B?B | BxB | ||||||||||||||||||
./B\?B | B?B | ||||||||||||||||||
./B\?B | BxB | ||||||||||||||||||
./C[C | C[C | ||||||||||||||||||
./C\[C | C[C | ||||||||||||||||||
./D\]D | D]D | ||||||||||||||||||
./D]D | D]D | ||||||||||||||||||
./E\E | E\E | ||||||||||||||||||
./E\\E | E\E | ||||||||||||||||||
./F'F | F'F | ||||||||||||||||||
./F\'F | F'F | ||||||||||||||||||
./G"G | G"G | ||||||||||||||||||
./G\"G | G"G | ||||||||||||||||||
./H H | H H | ||||||||||||||||||
./H\ H | H H |
There are some interesting patterns to note here:
- For includes, behavior with --no-wildcards is identical to the default behavior.
- For excludes, behavior with --wildcards is identical to the default behavior.
- Single quotes ('), double quotes ("), and spaces always match themselves exactly, regardless of wildcards.