2013-10-24 04:04:31 +02:00
|
|
|
# Download a single file
|
2013-10-11 18:31:40 +02:00
|
|
|
curl http://path.to.the/file
|
2013-10-10 23:03:30 +02:00
|
|
|
|
2013-10-24 04:04:31 +02:00
|
|
|
# Download a file and specify a new filename
|
2013-10-10 23:03:30 +02:00
|
|
|
curl http://example.com/file.zip -o new_file.zip
|
|
|
|
|
2013-10-24 04:04:31 +02:00
|
|
|
# Download multiple files
|
2013-10-11 18:31:40 +02:00
|
|
|
curl -O URLOfFirstFile -O URLOfSecondFile
|
2013-10-10 23:03:30 +02:00
|
|
|
|
|
|
|
# Download all sequentially numbered files (1-24)
|
|
|
|
curl http://example.com/pic[1-24].jpg
|
|
|
|
|
2013-10-24 04:04:31 +02:00
|
|
|
# Download a file and pass HTTP Authentication
|
2013-10-11 18:31:40 +02:00
|
|
|
curl -u username:password URL
|
|
|
|
|
2013-10-24 04:04:31 +02:00
|
|
|
# Download a file with a Proxy
|
|
|
|
curl -x proxysever.server.com:PORT http://addressiwantto.access
|
|
|
|
|
|
|
|
# Download a file from FTP
|
2013-10-10 23:03:30 +02:00
|
|
|
curl -u username:password -O ftp://example.com/pub/file.zip
|
|
|
|
|
2013-10-24 04:04:31 +02:00
|
|
|
# Get an FTP directory listing
|
2013-10-10 23:03:30 +02:00
|
|
|
curl ftp://username:password@example.com
|
|
|
|
|
2013-10-24 04:04:31 +02:00
|
|
|
# Resume a previously failed download
|
2013-10-10 23:03:30 +02:00
|
|
|
curl -C - -o partial_file.zip http://example.com/file.zip
|
|
|
|
|
2013-10-24 04:04:31 +02:00
|
|
|
# Fetch only the HTTP headers from a response
|
|
|
|
curl -I http://example.com
|
|
|
|
|
|
|
|
# Fetch your external IP and network info as JSON
|
2013-10-10 23:03:30 +02:00
|
|
|
curl http://ifconfig.me/all/json
|
|
|
|
|
2013-10-24 04:04:31 +02:00
|
|
|
# Limit the rate of a download
|
|
|
|
curl --limit-rate 1000B -O http://path.to.the/file
|
2017-05-15 16:08:21 +02:00
|
|
|
|
|
|
|
# Get your global IP
|
|
|
|
curl httpbin.org/ip
|