2016年2月1日 星期一

[Linux 文章收集] Use wget Command To Download Files From HTTPS Domains

Source From Here
Question
How do I download a file using https://example.com/dl/foo.tar.gz using wget command line utility? GNU Wget is a free utility for non-interactive download of files from the Web. It supports HTTP, HTTPS, and FTP protocols, as well as retrieval through HTTP proxies. The syntax is:
# wget --help
GNU Wget 1.14,非互動式檔案下載工具。
用法: wget [選項]... [URL]...
...

How-To
If you don't want about checking the validity of the certificate just pass the option --no-check-certificate to the wget command-line:
// --no-check-certificate 不檢驗伺服器的憑證
# wget --no-check-certificate https://cyberciti.biz/foo/bar.tar.gz


You can pass the --no-proxy option to the wget command. This option tells wget not to use proxies, even if the appropriate `*_proxy' environment variable is defined:
// --no-proxy 禁止使用代理伺服器
# wget --no-proxy https://cyberciti.biz/foo/bar.tar.gz

Set https proxy using httpd_proxy variable:
# export https_proxy="https://USERNAME-HERE:PASSWORD-HERE@Server-Name-Here:PORT-NUMBER-HERE/"
# export https_proxy="https://vivek:TopSecretePassword@server1.cyberciti.biz:3128/"
# wget https://cyberciti.biz/foo/bar.tar.gz

Or pass proxy server username and password to the server using wget command as follows:
# export https_proxy="https://server1.cyberciti.biz:3128/"
# wget --http-user="USER" --http-password="PASSWORD" https://cyberciti.biz/foo/bar.tar.gz


沒有留言:

張貼留言

[Git 常見問題] error: The following untracked working tree files would be overwritten by merge

  Source From  Here 方案1: // x -----删除忽略文件已经对 git 来说不识别的文件 // d -----删除未被添加到 git 的路径中的文件 // f -----强制运行 #   git clean -d -fx 方案2: 今天在服务器上  gi...