Downloading files using wget

Clash Royale CLAN TAG#URR8PPP
up vote
15
down vote
favorite
I am trying to download files from this website.
The URL is: http://www.ncbi.nlm.nih.gov/geo/download/?acc=GSE48191&format=file
When I use this command:
wget http://www.ncbi.nlm.nih.gov/geo/download/?acc=GSE48191&format=file
I get only index.html?acc=GSE48191 which is some kind of binary format.
How can I download the files from this HTTP site?
wget
add a comment |Â
up vote
15
down vote
favorite
I am trying to download files from this website.
The URL is: http://www.ncbi.nlm.nih.gov/geo/download/?acc=GSE48191&format=file
When I use this command:
wget http://www.ncbi.nlm.nih.gov/geo/download/?acc=GSE48191&format=file
I get only index.html?acc=GSE48191 which is some kind of binary format.
How can I download the files from this HTTP site?
wget
add a comment |Â
up vote
15
down vote
favorite
up vote
15
down vote
favorite
I am trying to download files from this website.
The URL is: http://www.ncbi.nlm.nih.gov/geo/download/?acc=GSE48191&format=file
When I use this command:
wget http://www.ncbi.nlm.nih.gov/geo/download/?acc=GSE48191&format=file
I get only index.html?acc=GSE48191 which is some kind of binary format.
How can I download the files from this HTTP site?
wget
I am trying to download files from this website.
The URL is: http://www.ncbi.nlm.nih.gov/geo/download/?acc=GSE48191&format=file
When I use this command:
wget http://www.ncbi.nlm.nih.gov/geo/download/?acc=GSE48191&format=file
I get only index.html?acc=GSE48191 which is some kind of binary format.
How can I download the files from this HTTP site?
wget
wget
edited 3 mins ago
Aaron Franke
3611416
3611416
asked Jul 22 '14 at 16:31
user3138373
85541430
85541430
add a comment |Â
add a comment |Â
3 Answers
3
active
oldest
votes
up vote
21
down vote
I think your ? gets interpreted by shell (Correction by vinc17: more likely, it's the & which gets interpreted).
Just try with simple quotes around your URL:
wget 'http://www.ncbi.nlm.nih.gov/geo/download/?acc=GSE48191&format=file'
Note that the file you are requesting is a .tar file but the above command will save it as index.html?acc=GSE48191&format=file. To have it correctly named, you can either rename it to .tar:
mv 'index.html?acc=GSE48191&format=file' GSE4819.tar
Or you can give the name as an option to wget:
wget -O GSE48191.tar 'http://www.ncbi.nlm.nih.gov/geo/download/?acc=GSE48191&format=file'
The above command will save the downloaded file as GSE48191.tar directly.
It gets downloaded but it is not even a directory. If you look at the link ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=GSE48191 , you can see there are multiple .gz files. I still can't access them??
â user3138373
Jul 22 '14 at 16:57
I suppose that the OP uses a shell that ignores?as a wildcard since nothing matches. The main problem is&: this will run the part that precedes (thus with an incomplete URL) in the background. But the solution is the same: to quote the URL.
â vinc17
Jul 22 '14 at 17:07
Thanks to you terdon and vinc for edit/corrections. @user3138373: I can't find your .gz files on provided links, could you please tell again what URL you use to see/access them?
â Qeole
Jul 22 '14 at 17:10
1
@user3138373 the file you download is an archive (.tarfile) that contains the .gz files. Once you have downloaded it, runtar xvf GSE4819.tarto expand the archive and access the files.
â terdonâ¦
Jul 22 '14 at 17:25
add a comment |Â
up vote
3
down vote
Another way that might possibly work is by using this command:
wget -O nameOfTar.tar "http://www.ncbi.nlm.nih.gov/geo/download/?acc=GSE48191&format=file"
The -O command will specify the name to download to.
Of course, your initial problem is because the "&" was being interpreted by the shell, surrounding the URL with double quotes fixes the issue.
2
-Ooption is used to specify the name of the file in which dowloaded data is saved. It has no incidence on downloaded data (maybe that's what you meant, but I found it unclear).
â Qeole
Jul 22 '14 at 17:16
Yes sorry, I will make my correction
â ryekayo
Jul 22 '14 at 17:17
I'm not sure why this got downvoted.
â ryekayo
Jul 22 '14 at 17:51
3
I did not downvote, but that's probably because your solution does not fix problem:&is interpreted by shell, and download of.tarfile will fail.
â Qeole
Jul 22 '14 at 17:54
add a comment |Â
up vote
0
down vote
wget -O "name-you-want-to-save-as.format" http://www.ncbi.nlm.nih.gov/geo/download/?acc=GSE48191&format=file
That should get you the file you want to download to the current directory you are in.
wget: missing URLis whatwgetreplies to that, because you are missing the argument to-O. Also, I think this probably doesn't solve the OP's problem anyway.
â Celada
Jul 19 '15 at 18:00
Because the URL contains&, this answer doesn't work unless you add""or''around the URL.
â Aaron Franke
Jan 8 at 2:33
add a comment |Â
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
21
down vote
I think your ? gets interpreted by shell (Correction by vinc17: more likely, it's the & which gets interpreted).
Just try with simple quotes around your URL:
wget 'http://www.ncbi.nlm.nih.gov/geo/download/?acc=GSE48191&format=file'
Note that the file you are requesting is a .tar file but the above command will save it as index.html?acc=GSE48191&format=file. To have it correctly named, you can either rename it to .tar:
mv 'index.html?acc=GSE48191&format=file' GSE4819.tar
Or you can give the name as an option to wget:
wget -O GSE48191.tar 'http://www.ncbi.nlm.nih.gov/geo/download/?acc=GSE48191&format=file'
The above command will save the downloaded file as GSE48191.tar directly.
It gets downloaded but it is not even a directory. If you look at the link ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=GSE48191 , you can see there are multiple .gz files. I still can't access them??
â user3138373
Jul 22 '14 at 16:57
I suppose that the OP uses a shell that ignores?as a wildcard since nothing matches. The main problem is&: this will run the part that precedes (thus with an incomplete URL) in the background. But the solution is the same: to quote the URL.
â vinc17
Jul 22 '14 at 17:07
Thanks to you terdon and vinc for edit/corrections. @user3138373: I can't find your .gz files on provided links, could you please tell again what URL you use to see/access them?
â Qeole
Jul 22 '14 at 17:10
1
@user3138373 the file you download is an archive (.tarfile) that contains the .gz files. Once you have downloaded it, runtar xvf GSE4819.tarto expand the archive and access the files.
â terdonâ¦
Jul 22 '14 at 17:25
add a comment |Â
up vote
21
down vote
I think your ? gets interpreted by shell (Correction by vinc17: more likely, it's the & which gets interpreted).
Just try with simple quotes around your URL:
wget 'http://www.ncbi.nlm.nih.gov/geo/download/?acc=GSE48191&format=file'
Note that the file you are requesting is a .tar file but the above command will save it as index.html?acc=GSE48191&format=file. To have it correctly named, you can either rename it to .tar:
mv 'index.html?acc=GSE48191&format=file' GSE4819.tar
Or you can give the name as an option to wget:
wget -O GSE48191.tar 'http://www.ncbi.nlm.nih.gov/geo/download/?acc=GSE48191&format=file'
The above command will save the downloaded file as GSE48191.tar directly.
It gets downloaded but it is not even a directory. If you look at the link ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=GSE48191 , you can see there are multiple .gz files. I still can't access them??
â user3138373
Jul 22 '14 at 16:57
I suppose that the OP uses a shell that ignores?as a wildcard since nothing matches. The main problem is&: this will run the part that precedes (thus with an incomplete URL) in the background. But the solution is the same: to quote the URL.
â vinc17
Jul 22 '14 at 17:07
Thanks to you terdon and vinc for edit/corrections. @user3138373: I can't find your .gz files on provided links, could you please tell again what URL you use to see/access them?
â Qeole
Jul 22 '14 at 17:10
1
@user3138373 the file you download is an archive (.tarfile) that contains the .gz files. Once you have downloaded it, runtar xvf GSE4819.tarto expand the archive and access the files.
â terdonâ¦
Jul 22 '14 at 17:25
add a comment |Â
up vote
21
down vote
up vote
21
down vote
I think your ? gets interpreted by shell (Correction by vinc17: more likely, it's the & which gets interpreted).
Just try with simple quotes around your URL:
wget 'http://www.ncbi.nlm.nih.gov/geo/download/?acc=GSE48191&format=file'
Note that the file you are requesting is a .tar file but the above command will save it as index.html?acc=GSE48191&format=file. To have it correctly named, you can either rename it to .tar:
mv 'index.html?acc=GSE48191&format=file' GSE4819.tar
Or you can give the name as an option to wget:
wget -O GSE48191.tar 'http://www.ncbi.nlm.nih.gov/geo/download/?acc=GSE48191&format=file'
The above command will save the downloaded file as GSE48191.tar directly.
I think your ? gets interpreted by shell (Correction by vinc17: more likely, it's the & which gets interpreted).
Just try with simple quotes around your URL:
wget 'http://www.ncbi.nlm.nih.gov/geo/download/?acc=GSE48191&format=file'
Note that the file you are requesting is a .tar file but the above command will save it as index.html?acc=GSE48191&format=file. To have it correctly named, you can either rename it to .tar:
mv 'index.html?acc=GSE48191&format=file' GSE4819.tar
Or you can give the name as an option to wget:
wget -O GSE48191.tar 'http://www.ncbi.nlm.nih.gov/geo/download/?acc=GSE48191&format=file'
The above command will save the downloaded file as GSE48191.tar directly.
edited Jul 22 '14 at 17:17
answered Jul 22 '14 at 16:46
Qeole
454510
454510
It gets downloaded but it is not even a directory. If you look at the link ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=GSE48191 , you can see there are multiple .gz files. I still can't access them??
â user3138373
Jul 22 '14 at 16:57
I suppose that the OP uses a shell that ignores?as a wildcard since nothing matches. The main problem is&: this will run the part that precedes (thus with an incomplete URL) in the background. But the solution is the same: to quote the URL.
â vinc17
Jul 22 '14 at 17:07
Thanks to you terdon and vinc for edit/corrections. @user3138373: I can't find your .gz files on provided links, could you please tell again what URL you use to see/access them?
â Qeole
Jul 22 '14 at 17:10
1
@user3138373 the file you download is an archive (.tarfile) that contains the .gz files. Once you have downloaded it, runtar xvf GSE4819.tarto expand the archive and access the files.
â terdonâ¦
Jul 22 '14 at 17:25
add a comment |Â
It gets downloaded but it is not even a directory. If you look at the link ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=GSE48191 , you can see there are multiple .gz files. I still can't access them??
â user3138373
Jul 22 '14 at 16:57
I suppose that the OP uses a shell that ignores?as a wildcard since nothing matches. The main problem is&: this will run the part that precedes (thus with an incomplete URL) in the background. But the solution is the same: to quote the URL.
â vinc17
Jul 22 '14 at 17:07
Thanks to you terdon and vinc for edit/corrections. @user3138373: I can't find your .gz files on provided links, could you please tell again what URL you use to see/access them?
â Qeole
Jul 22 '14 at 17:10
1
@user3138373 the file you download is an archive (.tarfile) that contains the .gz files. Once you have downloaded it, runtar xvf GSE4819.tarto expand the archive and access the files.
â terdonâ¦
Jul 22 '14 at 17:25
It gets downloaded but it is not even a directory. If you look at the link ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=GSE48191 , you can see there are multiple .gz files. I still can't access them??
â user3138373
Jul 22 '14 at 16:57
It gets downloaded but it is not even a directory. If you look at the link ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=GSE48191 , you can see there are multiple .gz files. I still can't access them??
â user3138373
Jul 22 '14 at 16:57
I suppose that the OP uses a shell that ignores
? as a wildcard since nothing matches. The main problem is &: this will run the part that precedes (thus with an incomplete URL) in the background. But the solution is the same: to quote the URL.â vinc17
Jul 22 '14 at 17:07
I suppose that the OP uses a shell that ignores
? as a wildcard since nothing matches. The main problem is &: this will run the part that precedes (thus with an incomplete URL) in the background. But the solution is the same: to quote the URL.â vinc17
Jul 22 '14 at 17:07
Thanks to you terdon and vinc for edit/corrections. @user3138373: I can't find your .gz files on provided links, could you please tell again what URL you use to see/access them?
â Qeole
Jul 22 '14 at 17:10
Thanks to you terdon and vinc for edit/corrections. @user3138373: I can't find your .gz files on provided links, could you please tell again what URL you use to see/access them?
â Qeole
Jul 22 '14 at 17:10
1
1
@user3138373 the file you download is an archive (
.tar file) that contains the .gz files. Once you have downloaded it, run tar xvf GSE4819.tar to expand the archive and access the files.â terdonâ¦
Jul 22 '14 at 17:25
@user3138373 the file you download is an archive (
.tar file) that contains the .gz files. Once you have downloaded it, run tar xvf GSE4819.tar to expand the archive and access the files.â terdonâ¦
Jul 22 '14 at 17:25
add a comment |Â
up vote
3
down vote
Another way that might possibly work is by using this command:
wget -O nameOfTar.tar "http://www.ncbi.nlm.nih.gov/geo/download/?acc=GSE48191&format=file"
The -O command will specify the name to download to.
Of course, your initial problem is because the "&" was being interpreted by the shell, surrounding the URL with double quotes fixes the issue.
2
-Ooption is used to specify the name of the file in which dowloaded data is saved. It has no incidence on downloaded data (maybe that's what you meant, but I found it unclear).
â Qeole
Jul 22 '14 at 17:16
Yes sorry, I will make my correction
â ryekayo
Jul 22 '14 at 17:17
I'm not sure why this got downvoted.
â ryekayo
Jul 22 '14 at 17:51
3
I did not downvote, but that's probably because your solution does not fix problem:&is interpreted by shell, and download of.tarfile will fail.
â Qeole
Jul 22 '14 at 17:54
add a comment |Â
up vote
3
down vote
Another way that might possibly work is by using this command:
wget -O nameOfTar.tar "http://www.ncbi.nlm.nih.gov/geo/download/?acc=GSE48191&format=file"
The -O command will specify the name to download to.
Of course, your initial problem is because the "&" was being interpreted by the shell, surrounding the URL with double quotes fixes the issue.
2
-Ooption is used to specify the name of the file in which dowloaded data is saved. It has no incidence on downloaded data (maybe that's what you meant, but I found it unclear).
â Qeole
Jul 22 '14 at 17:16
Yes sorry, I will make my correction
â ryekayo
Jul 22 '14 at 17:17
I'm not sure why this got downvoted.
â ryekayo
Jul 22 '14 at 17:51
3
I did not downvote, but that's probably because your solution does not fix problem:&is interpreted by shell, and download of.tarfile will fail.
â Qeole
Jul 22 '14 at 17:54
add a comment |Â
up vote
3
down vote
up vote
3
down vote
Another way that might possibly work is by using this command:
wget -O nameOfTar.tar "http://www.ncbi.nlm.nih.gov/geo/download/?acc=GSE48191&format=file"
The -O command will specify the name to download to.
Of course, your initial problem is because the "&" was being interpreted by the shell, surrounding the URL with double quotes fixes the issue.
Another way that might possibly work is by using this command:
wget -O nameOfTar.tar "http://www.ncbi.nlm.nih.gov/geo/download/?acc=GSE48191&format=file"
The -O command will specify the name to download to.
Of course, your initial problem is because the "&" was being interpreted by the shell, surrounding the URL with double quotes fixes the issue.
edited Jul 22 '14 at 22:07
user67289
answered Jul 22 '14 at 17:02
ryekayo
2,81582448
2,81582448
2
-Ooption is used to specify the name of the file in which dowloaded data is saved. It has no incidence on downloaded data (maybe that's what you meant, but I found it unclear).
â Qeole
Jul 22 '14 at 17:16
Yes sorry, I will make my correction
â ryekayo
Jul 22 '14 at 17:17
I'm not sure why this got downvoted.
â ryekayo
Jul 22 '14 at 17:51
3
I did not downvote, but that's probably because your solution does not fix problem:&is interpreted by shell, and download of.tarfile will fail.
â Qeole
Jul 22 '14 at 17:54
add a comment |Â
2
-Ooption is used to specify the name of the file in which dowloaded data is saved. It has no incidence on downloaded data (maybe that's what you meant, but I found it unclear).
â Qeole
Jul 22 '14 at 17:16
Yes sorry, I will make my correction
â ryekayo
Jul 22 '14 at 17:17
I'm not sure why this got downvoted.
â ryekayo
Jul 22 '14 at 17:51
3
I did not downvote, but that's probably because your solution does not fix problem:&is interpreted by shell, and download of.tarfile will fail.
â Qeole
Jul 22 '14 at 17:54
2
2
-O option is used to specify the name of the file in which dowloaded data is saved. It has no incidence on downloaded data (maybe that's what you meant, but I found it unclear).â Qeole
Jul 22 '14 at 17:16
-O option is used to specify the name of the file in which dowloaded data is saved. It has no incidence on downloaded data (maybe that's what you meant, but I found it unclear).â Qeole
Jul 22 '14 at 17:16
Yes sorry, I will make my correction
â ryekayo
Jul 22 '14 at 17:17
Yes sorry, I will make my correction
â ryekayo
Jul 22 '14 at 17:17
I'm not sure why this got downvoted.
â ryekayo
Jul 22 '14 at 17:51
I'm not sure why this got downvoted.
â ryekayo
Jul 22 '14 at 17:51
3
3
I did not downvote, but that's probably because your solution does not fix problem:
& is interpreted by shell, and download of .tar file will fail.â Qeole
Jul 22 '14 at 17:54
I did not downvote, but that's probably because your solution does not fix problem:
& is interpreted by shell, and download of .tar file will fail.â Qeole
Jul 22 '14 at 17:54
add a comment |Â
up vote
0
down vote
wget -O "name-you-want-to-save-as.format" http://www.ncbi.nlm.nih.gov/geo/download/?acc=GSE48191&format=file
That should get you the file you want to download to the current directory you are in.
wget: missing URLis whatwgetreplies to that, because you are missing the argument to-O. Also, I think this probably doesn't solve the OP's problem anyway.
â Celada
Jul 19 '15 at 18:00
Because the URL contains&, this answer doesn't work unless you add""or''around the URL.
â Aaron Franke
Jan 8 at 2:33
add a comment |Â
up vote
0
down vote
wget -O "name-you-want-to-save-as.format" http://www.ncbi.nlm.nih.gov/geo/download/?acc=GSE48191&format=file
That should get you the file you want to download to the current directory you are in.
wget: missing URLis whatwgetreplies to that, because you are missing the argument to-O. Also, I think this probably doesn't solve the OP's problem anyway.
â Celada
Jul 19 '15 at 18:00
Because the URL contains&, this answer doesn't work unless you add""or''around the URL.
â Aaron Franke
Jan 8 at 2:33
add a comment |Â
up vote
0
down vote
up vote
0
down vote
wget -O "name-you-want-to-save-as.format" http://www.ncbi.nlm.nih.gov/geo/download/?acc=GSE48191&format=file
That should get you the file you want to download to the current directory you are in.
wget -O "name-you-want-to-save-as.format" http://www.ncbi.nlm.nih.gov/geo/download/?acc=GSE48191&format=file
That should get you the file you want to download to the current directory you are in.
edited Jul 22 '15 at 4:43
answered Jul 19 '15 at 17:39
Samman Bikram Thapa
1113
1113
wget: missing URLis whatwgetreplies to that, because you are missing the argument to-O. Also, I think this probably doesn't solve the OP's problem anyway.
â Celada
Jul 19 '15 at 18:00
Because the URL contains&, this answer doesn't work unless you add""or''around the URL.
â Aaron Franke
Jan 8 at 2:33
add a comment |Â
wget: missing URLis whatwgetreplies to that, because you are missing the argument to-O. Also, I think this probably doesn't solve the OP's problem anyway.
â Celada
Jul 19 '15 at 18:00
Because the URL contains&, this answer doesn't work unless you add""or''around the URL.
â Aaron Franke
Jan 8 at 2:33
wget: missing URL is what wget replies to that, because you are missing the argument to -O. Also, I think this probably doesn't solve the OP's problem anyway.â Celada
Jul 19 '15 at 18:00
wget: missing URL is what wget replies to that, because you are missing the argument to -O. Also, I think this probably doesn't solve the OP's problem anyway.â Celada
Jul 19 '15 at 18:00
Because the URL contains
&, this answer doesn't work unless you add "" or '' around the URL.â Aaron Franke
Jan 8 at 2:33
Because the URL contains
&, this answer doesn't work unless you add "" or '' around the URL.â Aaron Franke
Jan 8 at 2:33
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f145946%2fdownloading-files-using-wget%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password