Reputation: 51
I am trying to unzip specific files from an archive.
Steps:
ZIP structure
Archive: folder/jce_policy-6.zip 9101 bytes 5 files
drwxr-xr-x 2.2 unx 0 bx stor 17-Nov-06 02:10 jce/
-r--r--r-- 2.2 unx 2663 tx defN 17-Nov-06 02:10 jce/COPYRIGHT.html
-r--r--r-- 2.2 unx 8386 tx defN 17-Nov-06 02:10 jce/README.txt
-rw-r--r-- 2.2 unx 2465 bx defN 17-Nov-06 02:10 jce/US_export_policy.jar
-rw-r--r-- 2.2 unx 2481 bx defN 17-Nov-06 02:10 jce/local_policy.jar
Copy JAR files:
unzip -o -j vendor/jce_policy-6.zip "*/*.jar" folder1/*.jar
Archive: vendor/jce_policy-6.zip
inflating: US_export_policy.jar
inflating: local_policy.jar
caution: filename not matched: folder1/*.jar
If I try unzip -o -j vendor/jce_policy-6.zip "*/*.jar" folder1/*
Archive: vendor/jce_policy-6.zip
inflating: US_export_policy.jar
inflating: local_policy.jar
caution: filename not matched: folder1/<list the files in the folder>
I googled as much as I could, but I am not sure I found the correct one. How can I do it?
Upvotes: 4
Views: 16689
Reputation: 87
I found the solution on another site. The *
symbol must be escaped, so you should run this instead:
unzip \\*.zip
Upvotes: 1
Reputation: 1343
For me, the case was a space. I had to rename my project name and remove that space and done.
Upvotes: 1