Curl: Difference between revisions
→One-Liners
Line 69:
* Save with name same as remote file
curl -O
curl -O
* Download files securely via SSH
curl -u user
curl -u username:password
* Get HTTP header information
curl -I
* Access an FTP server
curl
* Download a file via FTP
curl
curl -u ftpuser:password -O
* Upload a file to the FTP server
curl -T file.zip
curl -u ftpuser:password -T linuxtechi.txt
* To upload multiple files to FTP server
curl -u ftpuser:password -T "(linuxtechi1.txt linuxtechi2.txt)" ftp://ftp_pub/public_html/
* Deleting files from ftp server
curl ftp://ftp_pub/public_html -X 'DELE linuxtechi.zip' --user ftpuser:password
* Handle URL redirects
curl -L http://domain.com
* Debug level details
curl -v http://domain.com
* Using proxy to download a file
curl -x proxy.server.com:3128
* Limit data transfer rate
curl --limit-rate 1024B -O
* Download file modified after a given date
curl -z 1-Jan-17
* Download file modified before a given date
curl -z -1-Jan-17
* Resume a download
curl -C
* Verifying SSL certificate
curl --cacert new-ca.crt
* Ignoring the ssl certificate warning
curl -k
* Getting information about supported methods
curl -i -X OPTIONS http://10.107.88.68:8082
|