[英]curl is downloading the html rather than the actual zip file from gitlab
[英]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.