curl download/upload examples

  • Download and save the file to its origin name:
curl -O
  • Download and save to another file name:
curl -o mygettext.html
  • Fetch Multiple Files at a time
curl -O URL1 -O URL2
  • Continue/Resume a Previous Download
curl -C - -O
  • Follow HTTP Location Headers with -L option
curl -L
  • Pass HTTP/FTP Authentication in cURL
curl -u username:password URL
curl -u ftpuser:ftppass -O ftp://ftp_server/public_html/xss.php
  • Upload Files to FTP Server
curl -u ftpuser:ftppass -T "{file1,file2}"
  • Use Proxy to Download a File
curl -x
Last modified: le 2018/11/01 09:35