Download a file without wget or curl

7

How would one go about downloading a file from the command line without using Wget or Curl?

Steven Penny

Posted 2012-07-12T00:23:48.863

Reputation: 7 294

Answers

10

Using FTP:

ftp -A -v mirrors.sonic.net <<eof
binary
get cygwin/x86_64/setup.xz setup.xz
eof

Using OpenSSL - note this only works for HTTPS:

openssl s_client -quiet -connect superuser.com:443 <<eof
GET / HTTP/1.0
Host: superuser.com

eof

Using lynx:

lynx -source example.com > index.html

Steven Penny

Posted 2012-07-12T00:23:48.863

Reputation: 7 294

1

This works with telnet instead of lynx:

(echo 'GET /'; echo; sleep 1; ) | telnet example.com 80

janos

Posted 2012-07-12T00:23:48.863

Reputation: 2 449