curl

curl - transfer a URL.


Download a Single File:

curl http://www.yahoo.com > yahoo.html

Save the output to a file:

curl -o yahoo.htm http://www.yahoo.com

Save the output to a file using default name:

curl -O http://www.yahoo.com/index.htm

Download multiple files at a time:

curl -O http://www.google.com/index.htm -O http://www.yahoo.com/index.htm

Follow HTTP Redirect:

curl -L http://www.google.com

Continue a large file download:

curl -C - -O http://releases.ubuntu.com/18.04.1/ubuntu-18.04.1-desktop-amd64.iso

Limit Data Transfer rate:

curl --limit-rate 200k -O http://releases.ubuntu.com/18.04.1/ubuntu-18.04.1-desktop-amd64.iso

Download a file if modification time is older than:

curl -z 01-Dec-18 http://www.domain.com/index.html

Download a file if modification time is newer than:

curl -z -01-Dec-18 http://www.domain.com/index.html

Download multiples files in sequence:

curl ftp://ftp.domain.com/file[1-100].jpg

Use HTTP authentication:

curl -u username:password http://www.domain.com

Download file from FTP server:

curl -u user:pass -O ftp://ftp.domain.com/file.zip

Upload file to FTP server:

curl -u user:pass -T file.zip ftp://ftp.domain.com