[user@localhost ~]$ curl -husage: curl [options...] <url>options: (h) means http/https only, (f) means ftp only --anyauth pick any authentication method (h) -a, --append append to target file when uploading (f/sftp) --basic use http basic authentication (h) --cacert file ca certificate to verify peer against (ssl) --capath dir ca directory to verify peer against (ssl) -e, --cert cert[:passwd] client certificate file and password (ssl) --cert-type type certificate file type (der/pem/eng) (ssl) --ciphers list ssl ciphers to use (ssl) --compressed request compressed response (using deflate or gzip) -k, --config file specify which config file to read --connect-timeout seconds maximum time allowed for connection -c, --continue-at offset resumed transfer offset -b, --cookie string/file string or file to read cookies from (h) -c, --cookie-jar file write cookies to this file after operation (h) --create-dirs create necessary local directory hierarchy --crlf convert lf to crlf in upload --crlfile file get a crl list in pem format from the given file -d, --data data http post data (h) --data-ascii data http post ascii data (h) --data-binary data http post binary data (h) --data-urlencode data http post data url encoded (h) --delegation string gss-api delegation permission --digest use http digest authentication (h) --disable-eprt inhibit using eprt or lprt (f) --disable-epsv inhibit using epsv (f) -d, --dump-header file write the headers to this file --egd-file file egd socket path for random data (ssl) --engine enginge crypto engine (ssl). --engine list for list -f, --fail fail silently (no output at all) on http errors (h) -f, --form content specify http multipart post data (h) --form-string string specify http multipart post data (h) --ftp-account data account data string (f) --ftp-alternative-to-user command string to replace user [name] (f) --ftp-create-dirs create the remote dirs if not present (f) --ftp-method [multicwd/nocwd/singlecwd] control cwd usage (f) --ftp-pasv use pasv/epsv instead of port (f) -p, --ftp-port adr use port with given address instead of pasv (f) --ftp-skip-pasv-ip skip the ip address for pasv (f) --ftp-pret send pret before pasv (for drftpd) (f) --ftp-ssl-ccc send ccc after authenticating (f) --ftp-ssl-ccc-mode active/passive set ccc mode (f) --ftp-ssl-control require ssl/tls for ftp login, clear for transfer (f) -g, --get send the -d data with a http get (h) -g, --globoff disable url sequences and ranges using {} and [] -h, --header line custom header to pass to server (h) -i, --head show document info only -h, --help this help text --hostpubmd5 md5 hex encoded md5 string of the host public key. (ssh) -0, --http1.0 use http 1.0 (h) --ignore-content-length ignore the http content-length header -i, --include include protocol headers in the output (h/f) -k, --insecure allow connections to ssl sites without certs (h) --interface interface specify network interface/address to use -4, --ipv4 resolve name to ipv4 address -6, --ipv6 resolve name to ipv6 address -j, --junk-session-cookies ignore session cookies read from file (h) --keepalive-time seconds interval between keepalive probes --key key private key file name (ssl/ssh) --key-type type private key file type (der/pem/eng) (ssl) --krb level enable kerberos with specified security level (f) --libcurl file dump libcurl equivalent code of this command line --limit-rate rate limit transfer speed to this rate -l, --list-only list only names of an ftp directory (f) --local-port range force use of these local port numbers -l, --location follow redirects (h) --location-trusted like --location and send auth to other hosts (h) -m, --manual display the full manual --mail-from from mail from this address --mail-rcpt to mail to this receiver(s) --mail-auth auth originator address of the original email --max-filesize bytes maximum file size to download (h/f) --max-redirs num maximum number of redirects allowed (h) -m, --max-time seconds maximum time allowed for the transfer --metalink process given urls as metalink xml file --negotiate use http negotiate authentication (h) -n, --netrc must read .netrc for user name and password --netrc-optional use either .netrc or url; overrides -n --netrc-file file set up the netrc filename to use -n, --no-buffer disable buffering of the output stream --no-keepalive disable keepalive use on the connection --no-sessionid disable ssl session-id reusing (ssl) --noproxy list of hosts which do not use proxy --ntlm use http ntlm authentication (h) -o, --output file write output to <file> instead of stdout --pass pass pass phrase for the private key (ssl/ssh) --post301 do not switch to get after following a 301 redirect (h) --post302 do not switch to get after following a 302 redirect (h) --post303 do not switch to get after following a 303 redirect (h) -#, --progress-bar display transfer progress as a progress bar --proto protocols enable/disable specified protocols --proto-redir protocols enable/disable specified protocols on redirect -x, --proxy [protocol://]host[:port] use proxy on given port --proxy-anyauth pick any proxy authentication method (h) --proxy-basic use basic authentication on the proxy (h) --proxy-digest use digest authentication on the proxy (h) --proxy-negotiate use negotiate authentication on the proxy (h) --proxy-ntlm use ntlm authentication on the proxy (h) -u, --proxy-user user[:password] proxy user and password --proxy1.0 host[:port] use http/1.0 proxy on given port -p, --proxytunnel operate through a http proxy tunnel (using connect) --pubkey key public key file name (ssh) -q, --quote cmd send command(s) to server before transfer (f/sftp) --random-file file file for reading random data from (ssl) -r, --range range retrieve only the bytes within a range --raw do http raw, without any transfer decoding (h) -e, --referer referer url (h) -j, --remote-header-name use the header-provided filename (h) -o, --remote-name write output to a file named as the remote file --remote-name-all use the remote file name for all urls -r, --remote-time set the remote file's time on the local output -x, --request command specify request command to use --resolve host:port:address force resolve of host:port to address --retry num retry request num times if transient problems occur --retry-delay seconds when retrying, wait this many seconds between each --retry-max-time seconds retry only within this period -s, --show-error show error. with -s, make curl show errors when they occur -s, --silent silent mode. don't output anything --socks4 host[:port] socks4 proxy on given host + port --socks4a host[:port] socks4a proxy on given host + port --socks5 host[:port] socks5 proxy on given host + port --socks5-hostname host[:port] socks5 proxy, pass host name to proxy --socks5-gssapi-service name socks5 proxy service name for gssapi --socks5-gssapi-nec compatibility with nec socks5 server -y, --speed-limit rate stop transfers below speed-limit for 'speed-time' secs -y, --speed-time seconds time for trig speed-limit abort. defaults to 30 --ssl try ssl/tls (ftp, imap, pop3, smtp) --ssl-reqd require ssl/tls (ftp, imap, pop3, smtp) -2, --sslv2 use sslv2 (ssl) -3, --sslv3 use sslv3 (ssl) --ssl-allow-beast allow security flaw to improve interop (ssl) --stderr file where to redirect stderr. - means stdout --tcp-nodelay use the tcp_nodelay option -t, --telnet-option opt=val set telnet option --tftp-blksize value set tftp blksize option (must be >512) -z, --time-cond time transfer based on a time condition -1, --tlsv1 use => tlsv1 (ssl) --tlsv1.0 use tlsv1.0 (ssl) --tlsv1.1 use tlsv1.1 (ssl) --tlsv1.2 use tlsv1.2 (ssl) --trace file write a debug trace to the given file --trace-ascii file like --trace but without the hex output --trace-time add time stamps to trace/verbose output --tr-encoding request compressed transfer encoding (h) -t, --upload-file file transfer file to destination --url url url to work with -b, --use-ascii use ascii/text transfer -u, --user user[:password] server user and password --tlsuser user tls username --tlspassword string tls password --tlsauthtype string tls authentication type (default srp) --unix-socket file connect through this unix domain socket -a, --user-agent string user-agent to send to server (h) -v, --verbose make the operation more talkative -v, --version show version number and quit -w, --write-out format what to output after completion --xattr store metadata in extended file attributes -q if used as the first parameter disables .curlrc
以上就是linux: curl的详细内容。