Using Curl
Curl is a command line program useful for downloading and uploading files to the Webserver. It is freely available for Windows, Mac and Linux. Below we show a few different ways to use curl.
Downloading a file
You can download the file at at a given url like this
curl -O http://web2.uconn.edu/mysite/myfile.html
This will download the file myfile.html to your current directory. Instead, you can
just display the file on the screen if you omit the -O.
Downloading a file from a secure directory
You can download a file from a secure directory (more information about secure directories here) like this
curl -O -k https://USER:PASSWORD@web2.uconn.edu/mysite/mysecure/myfile.html
Replace USER and PASSWORD with your user name and password.
The -k option tells Curl to accept the servers SSL certificate without verification. This is sometimes
necessary when your client does not have a copy of the correct SSL authority certificate.
The -O option causes the file to be written to disk.
Downloading a file from a web site using WebDAV
You can download a file from a web site if you have WebDAV access with the following command
curl -O -k https://USER:PASSWORD@web2.uconn.edu:4443/mysite/myfile.html
Replace USER and PASSWORD with your user name and password.
The -k option tells Curl to accept the servers SSL certificate without verfication. This is sometimes
necessary when your client does not have a copy of the correct SSL authority certificate.
The -O option causes the file to be written to disk.
Uploading a file to a web site using WebDAV
You can upload a file from a web site if you have WebDAV access with the following command
curl -k -T LOCAL_FILE https://USER:PASSWORD@web2.uconn.edu:4443/mysite/mynewfile
Replace USER and PASSWORD with your user name and password.
This will upload file LOCAL_FILE on your system to the website mysite, and store it at mynewfile.
The -k option tells Curl to accept the servers SSL certificate without verfication. This is sometimes
necessary when your client does not have copy of the correct SSL authority certificate.
University of
Connecticut