Curl: Difference between revisions

81 bytes added ,  6 years ago
m
(→‎One-Liners: added data raw)
Line 68:
curl -O https://domain.com/file.zip -O https://domain.com/file2.zip
Download files securely via SSH curl -u user sftp://server.domain.com/path/to/file
curl -u username:password download_URLhttps://domain.com
Get HTTP header information curl -I http://domain.com
Access an FTP server curl ftp://ftp.domain.com --user username:password
Download a file via FTP curl ftp://ftp.domain.com/file.zip --user username:password
curl -u ftpuser:password -O ftp://ftp_pub/public_html/index.html
Upload a file to the FTP server curl -T file.zip ftp://ftp.domain.com/ --user username:password
curl -u ftpuser:password -T linuxtechi.txt ftp://ftp_pub/public_html/
To upload multiple files to FTP serve 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 download_URLhttps://domain.com
Limit data transfer rate curl --limit-rate 1024B -O download_URLhttps://domain.com
Download file modified after a given date curl -z 1-Jan-17 download_URLhttps://domain.com
Download file modified before a given date curl -z -1-Jan-17 download_URLhttps://domain.com
Resume a download curl -C download_URLhttps://domain.com
Verifying SSL certificate curl --cacert new-ca.crt download_URLhttps://domain.com
Ignoring the ssl certificate warning curl -k download_urlhttps://domain.com
 
=URL syntax=