[Zope-dev] somehow OT: How do I get a tar file containing the ".dtml" files only?

Matthew T. Kromer matt@zope.com
Mon, 01 Oct 2001 15:42:28 -0400


Joachim Werner wrote:

>Hi!
>
>I am working on internationalizing a Zope 2.4.1 instance with ZBabel and
>providing a set of patches for Zope 2.4.1. My idea was that things would
>become much easier if I had a tarball that just contains all *.dtml files
>and the folder structure for them, so I can distribute the tarball as a
>patch that can be applied to a plain 2.4.1 instance.
>
>Do we have any Unix/Linux/GNU experts on the list who know how to write that
>as a shell command? I am sure that with tar and grep and some pipes or so it
>is possible, I am just too dumb to find out the right syntax  ...
>
>Cheers
>
>Joachim
>

So you want something like a find . -name '*.dtml' which doesn't show 
directories?  Well, what you could do to create the tarball is something 
like:

find . -name '*.dtml' | tar -T - -cvf dtml.tar

which uses -T on gnu tar to read the filenames from stdin.

>