Using wget to download a file

Hello Everyone,

I'm trying to use wget recursively to download a file.

Only html files are being downloaded, instead of the target file.

I'm trying this for the first time, here's what I've tried:

wget -r -O jdk.bin http://cds.sun.com/is-bin/INTERSHOP.enfinity/WFS/CDS-CDS_Developer-Site/en_US/-/USD/VerifyItem-Start/jdk-6u4-linux-i586.bin?BundledLineItemUUID=_09IBe.lhyoAAAEYq_YMXRqM&OrderID=gRNIBe.l1jQAAAEYoPYMXRqM&ProductID=48tIBe.phvMAAAEWdt1NOLEE&FileName=/jdk-6u4-linux-i586.bin

The link for this download file is here:

https://cds.sun.com/is-bin/INTERSHOP.enfinity/WFS/CDS-CDS\_Developer-Site/en\_US/-/USD/ViewFilteredProducts-SingleVariationTypeFilter;pgid=m5sy.hOjk2-x8Y;sid=UKAQRO-lOXkQRagRtUZYQQANrvJ_UCLgBULfhfK7tUrq7g==

They don't support FTP , so that option is not possible.

Would anyone know if there's any other command that allows us to download a file over http , on the command line? Or if it is possible to make the wget work.

Any help is appreciate.

Try using a console browser.

You'll need to escape the url as it contains ? and & characters, both of which the shell will try and interpret.

Put the url in single quotes and you should get a bit closer.

Given that the request includes a session id I doubt that you'll get much mileage from trying to use wget.

Thank you for your replies.

I tried with a console browser (lynx), wget but I couldn't download the file.

With the console browser I couldn't get the file, because I don;t think there's a way to click on buttons (if they are not links).

But I finally downloaded it after scratching my head for a little while.

The linux is installed on a virtual pc on windows, so I installed proftpd on linux, then I downloaded the software through http with a browser and then I used winSCP to transfer the file from the windows to the linux ftp.