GNU Tar Include and Exclude Behavior: Difference between revisions

From wiki.zmanda.com
Jump to navigation Jump to search
(table)
 
(notes)
Line 457: Line 457:
</tr>
</tr>
</table>
</table>
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.

Revision as of 19:58, 25 May 2010

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*AA*A                                    
./A*AAxA                                    
./A\*AA*A                                    
./A\*AAxA                                    
./B?BB?B                                    
./B?BBxB                                    
./B\?BB?B                                    
./B\?BBxB                                    
./C[CC[C                                    
./C\[CC[C                                    
./D\]DD]D                                    
./D]DD]D                                    
./E\EE\E                                    
./E\\EE\E                                    
./F'FF'F                                    
./F\'FF'F                                    
./G"GG"G                                    
./G\"GG"G                                    
./H HH H                                    
./H\ HH 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.