簡體   English   中英

從github下載zip文件時curl不起作用

[英]Curl not working when downloading zip file from github

我試圖從 github 下載一個 zip 文件(大約 50Mb 大小)。

使用的命令是:

curl https://github.com/bhishanpdl/DMstack_obsfile_example/blob/master/example/trial00_good_fits.zip -L -o a.zip
curl -OLJ https://github.com/bhishanpdl/DMstack_obsfile_example/blob/master/example/trial00_good_fits.zip 
curl https://github.com/bhishanpdl/DMstack_obsfile_example/blob/master/example/trial00_good_fits.zip -OLJ

當我查看下載的文件時,它大約為 30KB,當我解壓縮它時,它不是我要查找的文件。

當我直接從網站下載 zip 文件時,我能夠下載正確的 zip 文件(當我解壓縮時,我得到 50Mb fits 文件)。

問題我們如何使用curl命令從 github 獲取上述 zip 文件?

參考
http://www.compciv.org/recipes/cli/downloading-with-curl/
從命令行下載 .zip 文件

筆記
我正在使用 Macos EL Capitan 而我沒有wget

下載地址略有不同。 嘗試 -

curl https://github.com/bhishanpdl/DMstack_obsfile_example/raw/master/example/trial00_good_fits.zip -L -o a.zip

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM