The Curl command is a file transfer tool that works under the command line using URL rules. It supports file uploads and downloads, so it is a comprehensive transfer tool, but traditionally, it is customary to call curl as a download tool.
As a powerful tool, curl supports a wide range of protocols including HTTP, HTTPS, FTP, post, cookies, authentication, downloading some files from specified offsets, user agent strings, speed limits, file size, progress bar, and more.
To do the web process and data retrieval automation, curl can wish a helping hand.
-a/--append when uploading a file, attaching to the target file-a/--user-agent set the user agent to send to the server-anyauth can use "any" authentication method-b/--cookie cookie string or file read location-- Basic use HTTP Basic authentication-b/--use-ascii use ASCII/text transfer-c/--cookie-jar The cookie is written to this file after the end of the Operation-c/--continue-at Breakpoint continues-d/--data HTTP Post to transmit data--data-ascii Post data in ASCII mode--data-binary post data in binary mode--negotiate use HTTP authentication--digest use a number Authentication--disable-eprt prohibit the use of eprt or LPRT--DISABLE-EPSV prohibit the use of Epsv-d/--dump-header to write header information to the file--egd-file as random data ( SSL) settings EGD socket path--tcp-nodelay use tcp_nodelay option-e/--referer Source URL-e/--cert client certificate file and password (SSL)--cert-type certificate file type ( Der/pem/eng) (SSL)--key private key Name (SSL)--key-type private key file type (Der/pem/eng) (SSL)--pass private key password (SSL)--engine Encryption engine uses (SSL). "--engine list" for list--cacert CA certificate (SSL)--capath CA directory (made using C_rehash) to verify peer against (SSL) --ciphers SSL Password--compressed required return is a compressed situation (using deflate or gzip)--connect-timeout set maximum request time--create-dirs built Directory hierarchy of local directories--CRLFThe upload is to turn LF into Crlf-f/--fail. HTTP error is not displayed if the connection fails--ftp-create-dirs if the remote directory does not exist, create a remote directory--ftp-method [MULTICWD/NOCWD/SINGLECWD] Control Use of CWD--FTP-PASV use PASV/EPSV instead of port--ftp-skip-pasv-ip when using PASV, ignore the IP address--ftp-ssl try to use SSL/TLS for FTP data transfer --FTP-SSL-REQD requires SSL/TLS for FTP data transfer-f/--form analog HTTP form submission Data--form-string analog HTTP form submission data-g/--globoff disable URL sequence and scope use {} and [] -g/--get sends data in a get way-h/--header the length of the HTTP header information passed to the server--ignore-content-length ignored by the custom header information-i/--include output includes protocol header information-i/ --head only the request header information is displayed-j/--junk-session-cookies read file into ignore session cookie--INTERFACE use specified network interface/address--KRB4 use specified security level krb4-k/-- Insecure allows you to not use a certificate to the SSL site-k/--config the specified profile read-l/--list-only list the file name under the FTP directory--limit-rate set transfer speed--local-port Force local port number -m/--max-time set Maximum transfer time--max-redirs set the maximum number of read directories--max-filesize set the maximum amount of files downloaded-m/--manual show full manual-n/--netrc read from NETRC file Username and password--netrc-optional use. netrc or URL to overwrite-n--NTLM use HTTP NTLM authentication-n/--no-buffer Disable buffered output-o/--output write output to this file -o/--remote-name writes the output to the file, keep the file name of the remote Files-p/--proxytunnel use the HTTP proxy--proxy-anyauth to select either Proxy authentication method--proxy-basic use Basic authentication on the proxy--proxy-digest on behalf of the The--PROXY-NTLM uses the NTLM authentication on the proxy-p/--ftp-port uses the port address instead of using PASV-Q as the first parameter, shutting down the. curlrc-q/--quote file before transferring, send command to server-R /--range retrieving random files from the http/1.1 or FTP server byte range--range-file read (SSL)-r/--remote-time the number of retries when a file is generated locally, while the remote file time--retry transmission occurs --retry-delay When a problem occurs with transmission, set the retry interval--retry-max-time the maximum retry time-s/--silent silent mode when there is a problem with the transmission. Do not output anything-s/--show-error display error--SOCKS4 with SOCKS4 Proxy given host and port--SOCKS5 with SOCKS5 proxy given host and port--stderr-t/--telnet-opti The on Telnet option sets--trace to debug the specified file--trace-ascii like--trace but no hex output--trace-time trace/verbose output, add timestamp-t/--upload-f Ile upload file--url spet URL to work with-u/--user set Server user and password-u/--proxy-user set proxy user name and password-w/--write-out [format] What output is finished -x/--proxy uses the HTTP proxy-x/--request on a given port to specify what command-y/--speed-time the time required to abandon the speed limit, by default the limit of 30-y/--speed-limit stop transfer speed, speed time
Use the command line tool curl to get the public IP address:
1. Curl ifconfig.me
2. Curl Ipinfo.io
3. When the query is Ipinfo.io after the specific IP address, the output is the information of this IP
Curl ipinfo.io/22.138.125.44
4. Direct use: Curl ip.cn display content is also more detailed
5.curl Http://members.3322.org/dyndns/getip (This open display is relatively fast)
Command Description Source website: http://man.linuxde.net/curl
The Curl command is detailed