Brief introduction
Curl is an open source URL-based file Transfer tool that supports HTTP, HTTPS, FTP, and other protocols that support post, cookie, authentication, extended head, speed limit, and more.
The Curl command uses a wide range of applications, such as downloading, sending HTTP requests, specifying HTTP headers, and so on.
Wget is a full-time download weapon, simple, single-minded, extreme, and curl can be downloaded, but the advantage is not to download, but is to simulate the submission of web data, the request message is set up to debug the Web page.
Wget supports recursive downloads, and curl does not support it. So the distinction is to download data using wget, Web debugging using Curl.
Common functions
Curl URL #下载文件到stdoutcurl url--silent #不显示进度curl url--silent--progress #显示 # Number of progress bar Curl URL--silent-o #下载数据写入文件, the file name is the same as the file name in the URL Curl URL--silent-o filename #手动指定文件名curl url-c offset #从指定偏移量位置继续下载, Offset is an integer in bytes of Curl url-c- #断点续传curl url--referer referer_url #指定参照页字符串curl url--cookie "user=peter;pass= 123456 " #手动指定并存储cookiecurl url--cookie-jar cookie_file #从文件中指定cookiecurl url--user-agent" mozilla/5.0 " #指定用户代理curl url-h "Host:www.peter.com"-H "accept-language:en" #设置多个http头部信息curl URL--limit-rate 20k #限制下载速度curl URL--max-filesize bytes #指定可下载的最大文件大小curl url-u user:pass #进行密码认证curl url-i # Print only the response header information
Curl URL-based file transfer tool