下面的curl和wget有什么区别?
What is the difference between curl and wget below?
curl -o mnist.zip -L http://webdocs.cs.ualberta.ca/~bx3/data/mnist.zip
curl: (7) 无法连接到 58.96.175.173 端口 7070:连接被拒绝
wget -o mnist.zip http://webdocs.cs.ualberta.ca/~bx3/data/mnist.zip
已成功下载 mnist.zip。
curl 和 wget 有什么区别?为什么卷曲被拒绝?
尝试 curl -v 后,我收到以下消息。
curl -o mnist.zip -L http://webdocs.cs.ualberta.ca/~bx3/data/mnist.zip -v
* Trying 58.96.175.173...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* connect to 58.96.175.173 port 7070 failed: Connection refused
* Failed to connect to 58.96.175.173 port 7070: Connection refused
* Closing connection 0
curl: (7) Failed to connect to 58.96.175.173 port 7070: Connection refused
但我仍然不知道为什么 curl 被拒绝了。
shell> wget http://webdocs.cs.ualberta.ca/~bx3/data/mnist.zip -d
DEBUG output created by Wget 1.15 on linux-gnu.
URI encoding = ‘UTF-8’
URI encoding = ‘UTF-8’
--2016-01-07 11:54:10-- http://webdocs.cs.ualberta.ca/~bx3/data/mnist.zip
Connecting to 58.96.175.173:7070... Closed fd 3
failed: Connection refused.
Releasing 0x0000000002598870 (new refcount 0).
Deleting unused 0x0000000002598870.
wget http://webdocs.cs.ualberta.ca/~bx3/data/mnist.zip
和 curl 一样被拒绝,但是 wget http://webdocs.cs.ualberta.ca/~bx3/data/mnist.zip -o mnist.zip
很好。为什么?这里有什么区别?
您最好尝试分析这两个请求
使用curl -v
来分析你做错了什么,你可以通过wget -d
来分析wget
请求,它显示了wget
请求[=14]发生了什么=]
wget's major strong side compared to curl is its ability to download recursively.
wget is command line only. There's no lib or anything, but curl features and is powered by libcurl.
curl supports FTP, FTPS, HTTP, HTTPS, SCP, SFTP, TFTP, TELNET, DICT, LDAP, LDAPS, FILE, POP3, IMAP, SMTP, RTMP and RTSP. wget supports HTTP, HTTPS and FTP.
curl builds and runs on more platforms than wget.
wget is part of the GNU project and all copyrights are assigned to FSF.
The curl project is entirely stand-alone and independent with no organization parenting at all
curl offers upload and sending capabilities. wget only offers plain HTTP POST support.
的原始来源
当我删除 http_proxy
时,一切都变得正常了。感谢golimar
有两个主要区别
- 在某些系统上,没有安装 wget,只有 curl 可用。
- 使用 wget 有一个主要优点。 wget支持递归下载,curl不支持
curl -o mnist.zip -L http://webdocs.cs.ualberta.ca/~bx3/data/mnist.zip
curl: (7) 无法连接到 58.96.175.173 端口 7070:连接被拒绝
wget -o mnist.zip http://webdocs.cs.ualberta.ca/~bx3/data/mnist.zip
已成功下载 mnist.zip。
curl 和 wget 有什么区别?为什么卷曲被拒绝?
尝试 curl -v 后,我收到以下消息。
curl -o mnist.zip -L http://webdocs.cs.ualberta.ca/~bx3/data/mnist.zip -v
* Trying 58.96.175.173...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* connect to 58.96.175.173 port 7070 failed: Connection refused
* Failed to connect to 58.96.175.173 port 7070: Connection refused
* Closing connection 0
curl: (7) Failed to connect to 58.96.175.173 port 7070: Connection refused
但我仍然不知道为什么 curl 被拒绝了。
shell> wget http://webdocs.cs.ualberta.ca/~bx3/data/mnist.zip -d
DEBUG output created by Wget 1.15 on linux-gnu.
URI encoding = ‘UTF-8’
URI encoding = ‘UTF-8’
--2016-01-07 11:54:10-- http://webdocs.cs.ualberta.ca/~bx3/data/mnist.zip
Connecting to 58.96.175.173:7070... Closed fd 3
failed: Connection refused.
Releasing 0x0000000002598870 (new refcount 0).
Deleting unused 0x0000000002598870.
wget http://webdocs.cs.ualberta.ca/~bx3/data/mnist.zip
和 curl 一样被拒绝,但是 wget http://webdocs.cs.ualberta.ca/~bx3/data/mnist.zip -o mnist.zip
很好。为什么?这里有什么区别?
您最好尝试分析这两个请求
使用curl -v
来分析你做错了什么,你可以通过wget -d
来分析wget
请求,它显示了wget
请求[=14]发生了什么=]
wget's major strong side compared to curl is its ability to download recursively.
wget is command line only. There's no lib or anything, but curl features and is powered by libcurl.
curl supports FTP, FTPS, HTTP, HTTPS, SCP, SFTP, TFTP, TELNET, DICT, LDAP, LDAPS, FILE, POP3, IMAP, SMTP, RTMP and RTSP. wget supports HTTP, HTTPS and FTP.
curl builds and runs on more platforms than wget.
wget is part of the GNU project and all copyrights are assigned to FSF.
The curl project is entirely stand-alone and independent with no organization parenting at all
curl offers upload and sending capabilities. wget only offers plain HTTP POST support.
的原始来源
当我删除 http_proxy
时,一切都变得正常了。感谢golimar
有两个主要区别
- 在某些系统上,没有安装 wget,只有 curl 可用。
- 使用 wget 有一个主要优点。 wget支持递归下载,curl不支持