web-dev-qa-db-ja.com

http urlからファイルをダウンロードする方法は?

Wgetを使用してftpからダウンロードする方法は知っていますが、wgetを使用して次のリンクからダウンロードすることはできませんでした。

http://www.ncbi.nlm.nih.gov/geo/download/?acc=GSE46130&format=file

ブラウザにコピーして貼り付けると、ダウンロードが開始されます。ただし、デスクトップからサーバーに移動する必要がないように、サーバーに直接ダウンロードする必要があります。どうすればいいのですか?

ありがとう!

22
olala

これは私がやったことです:

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

ダウンロードしたファイルの保存場所を指定するには、wgetで-Oオプションを使用します。例えば:

wget -O /path/to/file http://www.ncbi.nlm.nih.gov/geo/download/?acc=GSE46130&format=file
7
mti2935
# -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/
2
Cristian