一种列出战争档案中档案内容的班轮 [英] One liner for listing contents of file within war file
本文介绍了一种列出战争档案中档案内容的班轮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要能够读取jar文件中文件的内容(例如MANIFEST). 目前,我是通过提取文件的内容,然后列出它来完成此操作的
I need to be able to read the contents of a file (say MANIFEST) within a jar file. Currently I do this by extracting the contents of the file and then listing it
${JAVA_HOME}/bin/jar xvf SOME_WAR_FILE.war META-INF/MANIFEST.MF
cat META-INF/MANIFEST.MF
是否可以使用一个衬纸来执行此操作,而无需提取内容物?
Is it possible to do this using a one liner, without extracting the contents ?
推荐答案
这是您要寻找的吗?
unzip -qc SOME_WAR_FILE.war META-INF/MANIFEST.MF
请参见此处的先前答案.
这篇关于一种列出战争档案中档案内容的班轮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文