wget not saving file after download

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
4
down vote

favorite












So I am currently using the wget command on windows 10 powershell to download various files. However, when testing this command, files do not actually download.



For example, say I want to download this picture: https://yt3.ggpht.com/-v0soe-ievYE/AAAAAAAAAAI/AAAAAAAAAAA/OixOH_h84Po/s900-c-k-no-mo-rj-c0xffffff/photo.jpg



I would use the following:



PS C:UsersmynameDesktop> wget https://yt3.ggpht.com/-v0soe-ievYE/AAAAAAAAAAI/AAAAAAAAAAA/OixOH_h84Po/s900-c-k-no-mo-rj-c0xffffff/photo.jpg

StatusCode : 200
StatusDescription : OK
Content : 255, 216, 255, 224...
RawContent : HTTP/1.1 200 OK
Access-Control-Expose-Headers: Content-Length
Content-Disposition: inline;filename=""
Vary: Origin
Access-Control-Allow-Origin: *
X-Content-Type-Options: nosniff
X-XSS-Protection...
Headers : [Access-Control-Expose-Headers, Content-Length], [Content-Disposition, inline;filename=""],
[Vary, Origin], [Access-Control-Allow-Origin, *]...
RawContentLength : 31273


Once this process finishes, I do not observe any new files on my desktop.



However, this code does work:



wget https://yt3.ggpht.com/-v0soe-ievYE/AAAAAAAAAAI/AAAAAAAAAAA/OixOH_h84Po/s900-c-k-no-mo-rj-c0xffffff/photo.jpg -O google.jpg


So what is going on? Why does wget alone not download the file?










share|improve this question



















  • 2




    Your command looks fine. Where did this implementation of wget come from?
    – roaima
    Apr 19 '17 at 16:19







  • 3




    powershell uses wget and curl as aliases for its own Invoke-WebRequest. It's not clear to me that there is any relationship to wget other than capturing the typing habits of users of other operating systems.
    – user4556274
    Apr 19 '17 at 16:21







  • 1




    Mmm (it's nice to learn something else new). Arguably though, this is off-topic because we're talking about a Powershell command, not a UNIX/Linux utility.
    – roaima
    Apr 19 '17 at 16:28










  • @TimothyMartin initially that was my perspective too, but then I thought that it might be worth leaving open so that we can highlight that wget isn't wget. (IYSWIM.)
    – roaima
    Apr 19 '17 at 17:00











  • @roaima Good point. I'll retract my vote to close.
    – Timothy Martin
    Apr 19 '17 at 17:01














up vote
4
down vote

favorite












So I am currently using the wget command on windows 10 powershell to download various files. However, when testing this command, files do not actually download.



For example, say I want to download this picture: https://yt3.ggpht.com/-v0soe-ievYE/AAAAAAAAAAI/AAAAAAAAAAA/OixOH_h84Po/s900-c-k-no-mo-rj-c0xffffff/photo.jpg



I would use the following:



PS C:UsersmynameDesktop> wget https://yt3.ggpht.com/-v0soe-ievYE/AAAAAAAAAAI/AAAAAAAAAAA/OixOH_h84Po/s900-c-k-no-mo-rj-c0xffffff/photo.jpg

StatusCode : 200
StatusDescription : OK
Content : 255, 216, 255, 224...
RawContent : HTTP/1.1 200 OK
Access-Control-Expose-Headers: Content-Length
Content-Disposition: inline;filename=""
Vary: Origin
Access-Control-Allow-Origin: *
X-Content-Type-Options: nosniff
X-XSS-Protection...
Headers : [Access-Control-Expose-Headers, Content-Length], [Content-Disposition, inline;filename=""],
[Vary, Origin], [Access-Control-Allow-Origin, *]...
RawContentLength : 31273


Once this process finishes, I do not observe any new files on my desktop.



However, this code does work:



wget https://yt3.ggpht.com/-v0soe-ievYE/AAAAAAAAAAI/AAAAAAAAAAA/OixOH_h84Po/s900-c-k-no-mo-rj-c0xffffff/photo.jpg -O google.jpg


So what is going on? Why does wget alone not download the file?










share|improve this question



















  • 2




    Your command looks fine. Where did this implementation of wget come from?
    – roaima
    Apr 19 '17 at 16:19







  • 3




    powershell uses wget and curl as aliases for its own Invoke-WebRequest. It's not clear to me that there is any relationship to wget other than capturing the typing habits of users of other operating systems.
    – user4556274
    Apr 19 '17 at 16:21







  • 1




    Mmm (it's nice to learn something else new). Arguably though, this is off-topic because we're talking about a Powershell command, not a UNIX/Linux utility.
    – roaima
    Apr 19 '17 at 16:28










  • @TimothyMartin initially that was my perspective too, but then I thought that it might be worth leaving open so that we can highlight that wget isn't wget. (IYSWIM.)
    – roaima
    Apr 19 '17 at 17:00











  • @roaima Good point. I'll retract my vote to close.
    – Timothy Martin
    Apr 19 '17 at 17:01












up vote
4
down vote

favorite









up vote
4
down vote

favorite











So I am currently using the wget command on windows 10 powershell to download various files. However, when testing this command, files do not actually download.



For example, say I want to download this picture: https://yt3.ggpht.com/-v0soe-ievYE/AAAAAAAAAAI/AAAAAAAAAAA/OixOH_h84Po/s900-c-k-no-mo-rj-c0xffffff/photo.jpg



I would use the following:



PS C:UsersmynameDesktop> wget https://yt3.ggpht.com/-v0soe-ievYE/AAAAAAAAAAI/AAAAAAAAAAA/OixOH_h84Po/s900-c-k-no-mo-rj-c0xffffff/photo.jpg

StatusCode : 200
StatusDescription : OK
Content : 255, 216, 255, 224...
RawContent : HTTP/1.1 200 OK
Access-Control-Expose-Headers: Content-Length
Content-Disposition: inline;filename=""
Vary: Origin
Access-Control-Allow-Origin: *
X-Content-Type-Options: nosniff
X-XSS-Protection...
Headers : [Access-Control-Expose-Headers, Content-Length], [Content-Disposition, inline;filename=""],
[Vary, Origin], [Access-Control-Allow-Origin, *]...
RawContentLength : 31273


Once this process finishes, I do not observe any new files on my desktop.



However, this code does work:



wget https://yt3.ggpht.com/-v0soe-ievYE/AAAAAAAAAAI/AAAAAAAAAAA/OixOH_h84Po/s900-c-k-no-mo-rj-c0xffffff/photo.jpg -O google.jpg


So what is going on? Why does wget alone not download the file?










share|improve this question















So I am currently using the wget command on windows 10 powershell to download various files. However, when testing this command, files do not actually download.



For example, say I want to download this picture: https://yt3.ggpht.com/-v0soe-ievYE/AAAAAAAAAAI/AAAAAAAAAAA/OixOH_h84Po/s900-c-k-no-mo-rj-c0xffffff/photo.jpg



I would use the following:



PS C:UsersmynameDesktop> wget https://yt3.ggpht.com/-v0soe-ievYE/AAAAAAAAAAI/AAAAAAAAAAA/OixOH_h84Po/s900-c-k-no-mo-rj-c0xffffff/photo.jpg

StatusCode : 200
StatusDescription : OK
Content : 255, 216, 255, 224...
RawContent : HTTP/1.1 200 OK
Access-Control-Expose-Headers: Content-Length
Content-Disposition: inline;filename=""
Vary: Origin
Access-Control-Allow-Origin: *
X-Content-Type-Options: nosniff
X-XSS-Protection...
Headers : [Access-Control-Expose-Headers, Content-Length], [Content-Disposition, inline;filename=""],
[Vary, Origin], [Access-Control-Allow-Origin, *]...
RawContentLength : 31273


Once this process finishes, I do not observe any new files on my desktop.



However, this code does work:



wget https://yt3.ggpht.com/-v0soe-ievYE/AAAAAAAAAAI/AAAAAAAAAAA/OixOH_h84Po/s900-c-k-no-mo-rj-c0xffffff/photo.jpg -O google.jpg


So what is going on? Why does wget alone not download the file?







wget






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Apr 19 '17 at 16:25

























asked Apr 19 '17 at 16:14









Thessentials

262




262







  • 2




    Your command looks fine. Where did this implementation of wget come from?
    – roaima
    Apr 19 '17 at 16:19







  • 3




    powershell uses wget and curl as aliases for its own Invoke-WebRequest. It's not clear to me that there is any relationship to wget other than capturing the typing habits of users of other operating systems.
    – user4556274
    Apr 19 '17 at 16:21







  • 1




    Mmm (it's nice to learn something else new). Arguably though, this is off-topic because we're talking about a Powershell command, not a UNIX/Linux utility.
    – roaima
    Apr 19 '17 at 16:28










  • @TimothyMartin initially that was my perspective too, but then I thought that it might be worth leaving open so that we can highlight that wget isn't wget. (IYSWIM.)
    – roaima
    Apr 19 '17 at 17:00











  • @roaima Good point. I'll retract my vote to close.
    – Timothy Martin
    Apr 19 '17 at 17:01












  • 2




    Your command looks fine. Where did this implementation of wget come from?
    – roaima
    Apr 19 '17 at 16:19







  • 3




    powershell uses wget and curl as aliases for its own Invoke-WebRequest. It's not clear to me that there is any relationship to wget other than capturing the typing habits of users of other operating systems.
    – user4556274
    Apr 19 '17 at 16:21







  • 1




    Mmm (it's nice to learn something else new). Arguably though, this is off-topic because we're talking about a Powershell command, not a UNIX/Linux utility.
    – roaima
    Apr 19 '17 at 16:28










  • @TimothyMartin initially that was my perspective too, but then I thought that it might be worth leaving open so that we can highlight that wget isn't wget. (IYSWIM.)
    – roaima
    Apr 19 '17 at 17:00











  • @roaima Good point. I'll retract my vote to close.
    – Timothy Martin
    Apr 19 '17 at 17:01







2




2




Your command looks fine. Where did this implementation of wget come from?
– roaima
Apr 19 '17 at 16:19





Your command looks fine. Where did this implementation of wget come from?
– roaima
Apr 19 '17 at 16:19





3




3




powershell uses wget and curl as aliases for its own Invoke-WebRequest. It's not clear to me that there is any relationship to wget other than capturing the typing habits of users of other operating systems.
– user4556274
Apr 19 '17 at 16:21





powershell uses wget and curl as aliases for its own Invoke-WebRequest. It's not clear to me that there is any relationship to wget other than capturing the typing habits of users of other operating systems.
– user4556274
Apr 19 '17 at 16:21





1




1




Mmm (it's nice to learn something else new). Arguably though, this is off-topic because we're talking about a Powershell command, not a UNIX/Linux utility.
– roaima
Apr 19 '17 at 16:28




Mmm (it's nice to learn something else new). Arguably though, this is off-topic because we're talking about a Powershell command, not a UNIX/Linux utility.
– roaima
Apr 19 '17 at 16:28












@TimothyMartin initially that was my perspective too, but then I thought that it might be worth leaving open so that we can highlight that wget isn't wget. (IYSWIM.)
– roaima
Apr 19 '17 at 17:00





@TimothyMartin initially that was my perspective too, but then I thought that it might be worth leaving open so that we can highlight that wget isn't wget. (IYSWIM.)
– roaima
Apr 19 '17 at 17:00













@roaima Good point. I'll retract my vote to close.
– Timothy Martin
Apr 19 '17 at 17:01




@roaima Good point. I'll retract my vote to close.
– Timothy Martin
Apr 19 '17 at 17:01










1 Answer
1






active

oldest

votes

















up vote
7
down vote













The Powershell implementation of wget is not wget. So it doesn't behave like the UNIX/Linux utility wget.



As pointed out by user4556274, Powershell uses wget and curl as aliases for its own Invoke-WebRequest.



Looking at that (or running Get-Help wget under Powershell) it can be seen that the -O [filename] flag is an acceptable abbreviation for -Output [filename], and that Invoke-WebRequest [URI] actually returns an object representing a web page rather than writing a file named from the basename of the URL.



Thus, this returns "nothing" unless you assign it to a variable or pipe it to another command:



wget http://example.net/path/to/page.html


But this delivers a web page "as expected":



wget http://example.net/path/to/page.html -O page.html





share|improve this answer






















  • Makes sense. That is kind of silly that Powershell would use a command that doesn't do what it is commonly known for in UNIX
    – Thessentials
    Apr 19 '17 at 16:33






  • 1




    It has an alias (pardon me - Alias) that basically "fakes" it. See also ls which IIRC is an Alias for Get-ChildItem (with certain parameters).
    – DopeGhoti
    Apr 19 '17 at 17:29










  • @DopeGhoti I was aware of the fake ls but wget was a new one for me. The problem here is that the fakery is only skin-deep.
    – roaima
    Apr 19 '17 at 18:35










  • Powershell gonna powershell.
    – DopeGhoti
    Apr 19 '17 at 18:36










Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f359972%2fwget-not-saving-file-after-download%23new-answer', 'question_page');

);

Post as a guest






























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
7
down vote













The Powershell implementation of wget is not wget. So it doesn't behave like the UNIX/Linux utility wget.



As pointed out by user4556274, Powershell uses wget and curl as aliases for its own Invoke-WebRequest.



Looking at that (or running Get-Help wget under Powershell) it can be seen that the -O [filename] flag is an acceptable abbreviation for -Output [filename], and that Invoke-WebRequest [URI] actually returns an object representing a web page rather than writing a file named from the basename of the URL.



Thus, this returns "nothing" unless you assign it to a variable or pipe it to another command:



wget http://example.net/path/to/page.html


But this delivers a web page "as expected":



wget http://example.net/path/to/page.html -O page.html





share|improve this answer






















  • Makes sense. That is kind of silly that Powershell would use a command that doesn't do what it is commonly known for in UNIX
    – Thessentials
    Apr 19 '17 at 16:33






  • 1




    It has an alias (pardon me - Alias) that basically "fakes" it. See also ls which IIRC is an Alias for Get-ChildItem (with certain parameters).
    – DopeGhoti
    Apr 19 '17 at 17:29










  • @DopeGhoti I was aware of the fake ls but wget was a new one for me. The problem here is that the fakery is only skin-deep.
    – roaima
    Apr 19 '17 at 18:35










  • Powershell gonna powershell.
    – DopeGhoti
    Apr 19 '17 at 18:36














up vote
7
down vote













The Powershell implementation of wget is not wget. So it doesn't behave like the UNIX/Linux utility wget.



As pointed out by user4556274, Powershell uses wget and curl as aliases for its own Invoke-WebRequest.



Looking at that (or running Get-Help wget under Powershell) it can be seen that the -O [filename] flag is an acceptable abbreviation for -Output [filename], and that Invoke-WebRequest [URI] actually returns an object representing a web page rather than writing a file named from the basename of the URL.



Thus, this returns "nothing" unless you assign it to a variable or pipe it to another command:



wget http://example.net/path/to/page.html


But this delivers a web page "as expected":



wget http://example.net/path/to/page.html -O page.html





share|improve this answer






















  • Makes sense. That is kind of silly that Powershell would use a command that doesn't do what it is commonly known for in UNIX
    – Thessentials
    Apr 19 '17 at 16:33






  • 1




    It has an alias (pardon me - Alias) that basically "fakes" it. See also ls which IIRC is an Alias for Get-ChildItem (with certain parameters).
    – DopeGhoti
    Apr 19 '17 at 17:29










  • @DopeGhoti I was aware of the fake ls but wget was a new one for me. The problem here is that the fakery is only skin-deep.
    – roaima
    Apr 19 '17 at 18:35










  • Powershell gonna powershell.
    – DopeGhoti
    Apr 19 '17 at 18:36












up vote
7
down vote










up vote
7
down vote









The Powershell implementation of wget is not wget. So it doesn't behave like the UNIX/Linux utility wget.



As pointed out by user4556274, Powershell uses wget and curl as aliases for its own Invoke-WebRequest.



Looking at that (or running Get-Help wget under Powershell) it can be seen that the -O [filename] flag is an acceptable abbreviation for -Output [filename], and that Invoke-WebRequest [URI] actually returns an object representing a web page rather than writing a file named from the basename of the URL.



Thus, this returns "nothing" unless you assign it to a variable or pipe it to another command:



wget http://example.net/path/to/page.html


But this delivers a web page "as expected":



wget http://example.net/path/to/page.html -O page.html





share|improve this answer














The Powershell implementation of wget is not wget. So it doesn't behave like the UNIX/Linux utility wget.



As pointed out by user4556274, Powershell uses wget and curl as aliases for its own Invoke-WebRequest.



Looking at that (or running Get-Help wget under Powershell) it can be seen that the -O [filename] flag is an acceptable abbreviation for -Output [filename], and that Invoke-WebRequest [URI] actually returns an object representing a web page rather than writing a file named from the basename of the URL.



Thus, this returns "nothing" unless you assign it to a variable or pipe it to another command:



wget http://example.net/path/to/page.html


But this delivers a web page "as expected":



wget http://example.net/path/to/page.html -O page.html






share|improve this answer














share|improve this answer



share|improve this answer








edited 9 mins ago

























answered Apr 19 '17 at 16:30









roaima

41.4k547112




41.4k547112











  • Makes sense. That is kind of silly that Powershell would use a command that doesn't do what it is commonly known for in UNIX
    – Thessentials
    Apr 19 '17 at 16:33






  • 1




    It has an alias (pardon me - Alias) that basically "fakes" it. See also ls which IIRC is an Alias for Get-ChildItem (with certain parameters).
    – DopeGhoti
    Apr 19 '17 at 17:29










  • @DopeGhoti I was aware of the fake ls but wget was a new one for me. The problem here is that the fakery is only skin-deep.
    – roaima
    Apr 19 '17 at 18:35










  • Powershell gonna powershell.
    – DopeGhoti
    Apr 19 '17 at 18:36
















  • Makes sense. That is kind of silly that Powershell would use a command that doesn't do what it is commonly known for in UNIX
    – Thessentials
    Apr 19 '17 at 16:33






  • 1




    It has an alias (pardon me - Alias) that basically "fakes" it. See also ls which IIRC is an Alias for Get-ChildItem (with certain parameters).
    – DopeGhoti
    Apr 19 '17 at 17:29










  • @DopeGhoti I was aware of the fake ls but wget was a new one for me. The problem here is that the fakery is only skin-deep.
    – roaima
    Apr 19 '17 at 18:35










  • Powershell gonna powershell.
    – DopeGhoti
    Apr 19 '17 at 18:36















Makes sense. That is kind of silly that Powershell would use a command that doesn't do what it is commonly known for in UNIX
– Thessentials
Apr 19 '17 at 16:33




Makes sense. That is kind of silly that Powershell would use a command that doesn't do what it is commonly known for in UNIX
– Thessentials
Apr 19 '17 at 16:33




1




1




It has an alias (pardon me - Alias) that basically "fakes" it. See also ls which IIRC is an Alias for Get-ChildItem (with certain parameters).
– DopeGhoti
Apr 19 '17 at 17:29




It has an alias (pardon me - Alias) that basically "fakes" it. See also ls which IIRC is an Alias for Get-ChildItem (with certain parameters).
– DopeGhoti
Apr 19 '17 at 17:29












@DopeGhoti I was aware of the fake ls but wget was a new one for me. The problem here is that the fakery is only skin-deep.
– roaima
Apr 19 '17 at 18:35




@DopeGhoti I was aware of the fake ls but wget was a new one for me. The problem here is that the fakery is only skin-deep.
– roaima
Apr 19 '17 at 18:35












Powershell gonna powershell.
– DopeGhoti
Apr 19 '17 at 18:36




Powershell gonna powershell.
– DopeGhoti
Apr 19 '17 at 18:36

















 

draft saved


draft discarded















































 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f359972%2fwget-not-saving-file-after-download%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

How to check contact read email or not when send email to Individual?

Bahrain

Postfix configuration issue with fips on centos 7; mailgun relay