Diagram download and upload files using curl

Source: Internet
Author: User
Tags curl

See

http://blog.csdn.net/wulong710/article/details/53127606


The following schematic operation process;


Download a single file and print the output to standard output (STDOUT) by default


Save the downloaded file to the specified file with the-o/-o option:
-O: Save the file as the file name specified on the command line
-O: Save the file to local using the default file name in the URL
You can also use the turn character ">" to turn output to output



Simultaneous access to multiple files;

No file name specified;



2 files were obtained;



Breakpoint Continuation
By using the-C option, you can use the breakpoint continuation feature for large files.





Using network speed limiting for curl
Limit the maximum network usage of curl with the--limit-rate option
The maximum download speed is no more than 1000b/second



Download files that have been modified in the specified time
When downloading a file, you can determine the last modified date of the file, if the file has been modified within the specified date, download it, otherwise it will not be downloaded.
This feature can be achieved by using the-Z option:



Curl Authorization
A user name and password can be authorized with the-u option when accessing a page that requires authorization
It is common practice to enter only the user name at the command line and then prompt for a password, which guarantees that the password will not be compromised when viewing history
Curl-u username URL

Below try to login my Sohu mailbox, did not succeed, do not know the reason, the next time to engage;



Querying words through a dictionary
# Query The meaning of bash words
# List all available dictionaries
# Query The meaning of bash words in the Foldoc dictionary







Set up a proxy for curl
-X option to add agent functionality to curl



# Save cookies from the website to the Baiducookies file
# Use last saved cookie information





This is the content of the cookie file;




Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.