加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

如何从JAR使用Bash读取MANIFEST.MF文件

发布时间:2020-12-15 16:31:20 所属栏目:安全 来源:网络整理
导读:我需要阅读MANIFEST.MF maven清单文件从“some.jar”使用bash $ unzip -q -c myarchive.jar META-INF/MANIFEST.MF -q将禁止解压缩程序的详细输出 -c将提取到stdout 例: $ unzip -q -c commons-lang-2.4.jar META-INF/MANIFEST.MFManifest-Version: 1.0Ant-V
我需要阅读MANIFEST.MF maven清单文件从“some.jar”使用bash
$ unzip -q -c myarchive.jar META-INF/MANIFEST.MF

> -q将禁止解压缩程序的详细输出
> -c将提取到stdout

例:

$ unzip -q -c commons-lang-2.4.jar META-INF/MANIFEST.MF

Manifest-Version: 1.0
Ant-Version: Apache Ant 1.7.0
Created-By: 1.5.0_13-119 (Apple Inc.)
Package: org.apache.commons.lang
Extension-Name: commons-lang
Specification-Version: 2.4
Specification-Vendor: Apache Software Foundation
Specification-Title: Commons Lang
Implementation-Version: 2.4
Implementation-Vendor: Apache Software Foundation
Implementation-Title: Commons Lang
Implementation-Vendor-Id: org.apache
X-Compile-Source-JDK: 1.3
X-Compile-Target-JDK: 1.2

或者,您可以使用-p而不是-q -c。

-p extract files to pipe (stdout). Nothing but the file data is sent to stdout,and the files are always extracted in binary format,just as they are stored (no conversions).

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读