Curl
Encyclopedia : C : CU : CUR : Curl
- The correct title of this } is }}}. The initial letter is capitalized due to [Naming conventions #Lower case first lettertechnical restrictions].
- For other uses, see Curl (disambiguation).
The main purpose and use for curl the command line tool is to automate unattended file transfers or sequences of operations. It is for example a good tool for simulating a user's actions at a web browser.
Libcurl is the corresponding library/API that users may incorporate into their programs. You may think of cURL as a stand-alone executable made out of the libcurl library. libcurl is being used to provide URL transfer capabilities to numerous applications, Open Source as well as many commercial ones.
More than 30 different bindings are available for libcurl.
Command-Line Example
On a computer running Unix (or a Unix-like operating system such as Linux, or a somewhat Unix-like compatibility layer such as Cygwin), the following command downloads the HTML source for the article you are reading, to a file curl.html in the current directory:
$ curl -o curl.html http://en.wikipedia.org/wiki/CURL % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed100 15167 0 15167 0 0 25473 0 --:--:-- --:--:-- --:--:-- 99258
For comparison, the equivalent procedure in a typical Web browser would be:
- Browse to the article.
- Select File | Save Page As...
- On the Save As dialog, navigate to the directory where you wish to save the page, and type a suitable filename in the File Name field.
See also
Other File Transfer Programs
External links
From Wikipedia, the Free Encyclopedia. Original article here. Support Wikipedia by contributing or donating.
All text is available under the terms of the GNU Free Documentation License See Wikipedia Copyrights for details.
