Aro*_*Raj 4 linux jar unzip archive
我正在尝试从存档中解压缩特定文件。
脚步:
邮编结构
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
Run Code Online (Sandbox Code Playgroud)
复制 JAR 文件:
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
Run Code Online (Sandbox Code Playgroud)
如果我尝试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>
Run Code Online (Sandbox Code Playgroud)
我尽可能多地用谷歌搜索,但我不确定我找到了正确的。我该怎么做?
Ano*_*ous 11
我有一个解决方案。
\n上述错误表明您错误地使用了unzip命令。您的 shell 将命令 \xe2\x80\x98unzip *.zip\xe2\x80\x99 展开,如下所示:
\nunzip a.zip b.zip c.zip\n
Run Code Online (Sandbox Code Playgroud)\n解决方案:
\nunzip \'*.zip\'\n
Run Code Online (Sandbox Code Playgroud)\n执行此 shell 不会\xe2\x80\x99 识别它\xe2\x80\x99 是通配符。
\n