LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Wget or Curl Issue (https://www.linuxquestions.org/questions/linux-newbie-8/wget-or-curl-issue-4175553624/)

ulto 09-16-2015 01:40 AM

Wget or Curl Issue
 
I am trying to download a tar.gz file using either wget or curl. However, the direct file is behind a URL.
https://pm.puppetlabs.com/cgi-bin/do..._64&ver=latest

Therefore when the options I have tried it only downloads about 112k worth of data rather then the 300MB it should download.
Any hints. I know this should be straightforward but am I missing something?

grail 09-16-2015 06:51 AM

Please show the command you are using?

schneidz 09-16-2015 07:33 AM

this worx for me:
Code:

[schneidz@hyper ~]$ wget 'https://pm.puppetlabs.com/cgi-bin/download.cgi?dist=el&rel=6&arch=x86_64&ver=latest'
--2015-09-16 08:30:23--  https://pm.puppetlabs.com/cgi-bin/download.cgi?dist=el&rel=6&arch=x86_64&ver=latest
Resolving pm.puppetlabs.com (pm.puppetlabs.com)... 192.155.89.90, 2600:3c03::f03c:91ff:fedb:6b1d
Connecting to pm.puppetlabs.com (pm.puppetlabs.com)|192.155.89.90|:443... connected.
HTTP request sent, awaiting response... 302 Moved
Location: https://pm.puppetlabs.com/puppet-enterprise/2015.2.0/puppet-enterprise-2015.2.0-el-6-x86_64.tar.gz [following]
--2015-09-16 08:30:23--  https://pm.puppetlabs.com/puppet-enterprise/2015.2.0/puppet-enterprise-2015.2.0-el-6-x86_64.tar.gz
Reusing existing connection to pm.puppetlabs.com:443.
HTTP request sent, awaiting response... 302 Found
Location: https://s3.amazonaws.com/pe-builds/released/2015.2.0/puppet-enterprise-2015.2.0-el-6-x86_64.tar.gz [following]
--2015-09-16 08:30:23--  https://s3.amazonaws.com/pe-builds/released/2015.2.0/puppet-enterprise-2015.2.0-el-6-x86_64.tar.gz
Resolving s3.amazonaws.com (s3.amazonaws.com)... 54.231.81.187
Connecting to s3.amazonaws.com (s3.amazonaws.com)|54.231.81.187|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 317684759 (303M) [application/x-tar]
Saving to: download.cgi?dist=el&rel=6&arch=x86_64&ver=latest

download.cgi?dist=el&rel=6&a 100[===============================================>] 302.97M  1.46MB/s  in 3m 11s

2015-09-16 08:33:35 (1.59 MB/s) - download.cgi?dist=el&rel=6&arch=x86_64&ver=latest saved [317684759/317684759]


ulto 09-17-2015 01:12 AM

Yes, with the' ' it works for me as well.
Thanks

grail 09-17-2015 07:14 AM

Please remember to mark as solved once you have a solution.

jpollard 09-17-2015 07:21 AM

The "Why it works" is because of the special characters used in the URL: the ? and & characters. the ? is the wildcard substitution and & for putting the command into the background.


All times are GMT -5. The time now is 06:16 PM.