浙江省高等学校教师教育理论培训

微信搜索“毛凌志岗前心得”小程序

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

Download A File Using Cygwin and cURL

Download A File Using Cygwin and cURL

I'm starting to like using Cygwin more and more. Command line scripting allows me to get the information without all of the hassle. Why should I open Firefox, type in the address, deal with the ads, and click 5 links before I can get to what I want when I can use command line to download what I want? Here's how you can download a file using the cURL package from the command line.

The Bash Script

copycurl http://davidwalsh.name/ --O homepage.txt

The above example downloads my homepage and saves it into a file named homepage.txt. The file gets downloaded to the c:\cygwin\home\{user}\ folder. For fun, here's how to download Cygwin's setup file from Cygwin.

copycurl http://cygwin.com/setup.exe --O cygwin-setup.exe

Great stuff. What would you use this for?

posted on 2012-02-28 16:28  lexus  阅读(279)  评论(0编辑  收藏  举报