1) Curl Command to download the data from a internet site.
curl -O https://testserver.com.au/file.zip
sometimes if secure option is enabled it will not allow to download the file. We may get error
curl failed the legitimacy of the server and therefore could not establish a secure connection to it. so to fix this we use -k option.
curl -k -O https://testserver.com.au/file.zip
2) to check curl version, below command will be used
curl --version
3) To download the files from Mainframe we can use curl command.
First we need to configure netrc file which contains user name and password to connect mainframe file.
curl -netrc --ftp-ssl --use-ascii ftp://mainframeserver.com/"'AB.G.C'" -o /var/opt/sw/Files/output.dat
4) To upload the files to Mainframe we can use curl command.
First we need to configure netrc file which contains user name and password to connect mainframe file.
curl -netrc --ftp-ssl --use-ascii -quote "site RDW LRECL=200 RECFM=FB CYLINDERS PRIMARY=4000 SECONDARY=400" --upload-file /var/opt/sw/Files/output.dat ftp://mainframeserver.com/"'AB.G.C'"
5) Curl Command to use verbose mode a internet site.
curl -verbose -O https://testserver.com.au/file.zip
6)Curl Command to use ntlm for download file and place in specific directory
curl -k -ntlm -netrc https://testserver.com.au/file.zip -o /var/opt/sw/Files/output.dat
7) Curl Command to verfify firewall connection
curl -v http://ipaddress:portnumber
curl -v ftps://ipaddress:port
8) Curl Command to download from insecure sites
curl -v -i -k -O -insecure https://testserver.com.au/file.zip -o file.zip
No comments:
Post a Comment