unix 如何从HTTP URL下载文件?

eh57zj3b  于 8个月前  发布在  Unix
关注(0)|答案(3)|浏览(98)

我知道如何使用wget从FTP下载,但我无法使用wget从以下链接下载:
http://www.ncbi.nlm.nih.gov/geo/download/?acc=GSE46130&format=file
如果您将其复制并粘贴到浏览器中,它将开始下载。但我想直接下载到我们的服务器,所以我不需要把它从我的桌面移动到服务器。我该怎么做?
谢谢你,谢谢

mdfafbf1

mdfafbf11#

这就是我所做的:

wget -O file.tar "http://www.ncbi.nlm.nih.gov/geo/download/?acc=GSE46130&format=file"
wgxvkvu9

wgxvkvu92#

对wget使用-O选项,指定保存下载文件的位置。举例来说:

wget -O /path/to/file http://www.ncbi.nlm.nih.gov/geo/download/?acc=GSE46130&format=file
slsn1g29

slsn1g293#

# -r : recursive    
# -nH : Disable generation of host-prefixed directories
# -nd : all files will get saved to the current directory
# -np : Do not ever ascend to the parent directory when retrieving recursively. 
# -R index.html*,999999-99999-1990.gz* : don't download files with this files pattern
wget -r -nH -nd -np -R *.html,999999-99999-1990.gz* http://www1.ncdc.noaa.gov/pub/data/noaa/1990/

相关问题