I have a zip archive that contains a directory hierarchy of files. I want to use the Linux unzip command to extract just the subset of these files that have a particular string somewhere in the directory path leading up to the file.
For example, suppose the file foo.zip contains these files:
a/1.txt
acme/2.txt
a/acme/b/3.txt
a/b/acmenet/c/4.txt
a/b/c/5.txt
a/acme/d/6.php
The Linux command "unzip foo.zip *.txt" will extract all 5 of the "txt" files.
How can this Linux command be modified so that it only extracts the 3 "txt" files that have the string "acme" somewhere in the directory path (so it would extract only 2.txt, 3.txt and 4.txt)?