【发布时间】:2022-01-01 03:20:25
【问题描述】:
是否可以使用 curl 或 wget 下载所有 repo 文件夹? 我可以像个人一样做, curl -X GET -u 用户:通过 http://IP:8081/repository/somefile.xx -O 但是有数百个,并且每周更新。
【问题讨论】:
-
links=$(curl -u user:pass -X GET 'IP:8081/service/rest/v1/search/…' | grep downloadUrl | cut -d ":" -f 2-4 | cut -d "," -f1 | cut -d'"' -f 2) 用于 $links 中的链接;执行 curl -X GET -u user:pass IP:8081/repository/test/rpm/3.0.0/${link} -O done