如何从Linux命令行中的工件中获取MD5校验和

问题描述 投票:0回答:1

[enter image description here我必须从人工链接中获取MD5校验和:

www.artifactory_company_link / artifactory / webapp /#/ artifacts / browse / tree / General / abc.html

我尝试过CURL -Iartistory_link。但是没有得到MD5校验和。

python linux md5 artifactory md5sum
1个回答
0
投票

要从命令行获取MD5校验和,您需要使用Artifactory File Info REST API

因此,获取文件的MD5校验和的正确方法是(假设General存储库在此处)

curl -s www.artifactory_company_link/artifactory/api/storage/General/abc.html

这将输出文件信息的大json输出,包括其MD5校验和。使用jq仅获取校验和

curl -s www.artifactory_company_link/artifactory/api/storage/General/abc.html | jq ".checksums.md5"
© www.soinside.com 2019 - 2024. All rights reserved.