简体   繁体   English

curl中的wget替代

[英]wget alternative in curl

I am using wget on linux system like :我在 linux 系统上使用 wget,例如:

 wget -r -nH --cut-dirs=3 --user="username" --password="password" --no-parent https://artifactory.company.com/nestetedlink1/nested_link2/directory_to_download -P home/user

Using this I get only files saved in the path no unwanted directory component from url: home/user/file_1, file_2使用这个我只得到保存在路径中的文件,没有来自url的不需要的目录组件: home/user/file_1, file_2

Is this possible to do the same functionality using curl command?这可以使用 curl 命令执行相同的功能吗? if I have to stick with WGET how to pass the api key I tried the below with --header='X-Auth-Token:, am I doing something wrong :如果我必须坚持使用 WGET 如何传递 api 密钥,我尝试了以下 --header='X-Auth-Token:,我做错了什么:

 wget -r -nH --cut-dirs=3 --header='X-Auth-Token: <api_key>' --no-parent https://artifactory.company.com/nestetedlink1/nested_link2/directory_to_download -P home/user

How to insert api Key instead of username and password in wget?如何在 wget 中插入 api Key 而不是用户名和密码?

wget --header='X-JFrog-Art-Api:api-key' https://artifactoryurl/filename.gz

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM