Curl download a list of files
In the case of our readme, the complete command would like this:. So what if we want to use cURL to save a file to our server? For that, we must use the -O option:. You'll notice that cURL will display a download progress table rather than the file contents this time:.
If you'd like the file to have a different file name perhaps readme is too bossy for you , specify it after -O :. That's all well and good, but downloading lots of files in this way would quickly become a hassle. You can download more than one file in a single command by using the following syntax:. If you have a long list of different files you want to download, you can place them in a text file and run cURL with xargs:.
Sign Up. DigitalOcean home. Community Control Panel. Hacktoberfest Contribute to Open Source. Launch an Interactive Terminal! About the authors. Brian Hogan. Still looking for an answer? Ask a question Search for more help. Comments Follow-Up Questions. Before you can do that To complete this action, sign in to your Community account or create a new one. I guess you were late to this question but this answer solved my problem for me so thanks a lot!
Oh, I have just the thing you need! Prasanth Prasanth 5, 2 2 gold badges 25 25 silver badges 58 58 bronze badges. Umm, no! At the least, you'd have to install standalone php with cURL.
Oh, I just pasted something I had already written. When I wrote this, I wanted it specifically in php, curl. So, at that time, it was the perfect solution for me. Show 3 more comments. To get ride of. To support names with spaces. Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password.
Post as a guest Name. Email Required, but never shown. The Overflow Blog. Podcast Who is building clouds for the independent developer? Exploding turkeys and how not to thaw your frozen bird: Top turkey questions Featured on Meta.
Now live: A fully responsive profile. Reducing the weight of our footer. Linked 1. Related Hot Network Questions. Question feed. Stack Overflow works best with JavaScript enabled. Accept all cookies Customize settings.
0コメント