Wednesday, April 09, 2008

How to extract certain kinds of files from tared file?

First, here is a example:
$ tar -xf foo.tar --wildcards '*.txt' --no-wildcards '[remarks]' 

instructs tar to extract from ‘foo.tar’ all files whose names end in ‘.txt’ and the file named ‘[remarks]’.


Another example:
> gtar zxvf gsoln.v2.tar.gz --wildcards "*.org"
will extract all glorg output files *.org to gsoln directory.

No comments: