Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

[SOLVED]Cannot download with curl

New to Debian (Or Linux in general)? Ask your questions here!
Post Reply
Message
Author
alex.theoto
Posts: 13
Joined: 2014-12-17 16:50

[SOLVED]Cannot download with curl

#1 Post by alex.theoto »

I'm sorry for my dump question but I'm stuck here.

On the web, I read that with the command

Code: Select all

curl -O http://....
I can download a file and with the lowercase -o I can rename the downloaded file.
But I try with no success.
For example,

Code: Select all

curl -O https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/debian-9.0.0-amd64-netinst.iso
will download an html file like:

Code: Select all

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>302 Found</title>
</head><body>
<h1>Found</h1>
<p>The document has moved <a href="https://caesar.ftp.acc.umu.se/debian-cd/current/amd64/iso-cd/debian-9.0.0-amd64-netinst.iso">here</a>.</p>
<hr>
<address>Apache/2.4.26 (Unix) Server at cdimage.debian.org Port 443</address>
</body></html>
How do I download something with curl?
Last edited by alex.theoto on 2017-07-08 20:32, edited 1 time in total.

User avatar
Lysander
Posts: 643
Joined: 2017-02-23 10:07
Location: London
Been thanked: 1 time

Re: Cannot download with curl

#2 Post by Lysander »

Never heard of it till now but it has to be installed first.

Code: Select all

sudo apt-get install curl
Then you can download files re the tutorials here:

http://www.slashroot.in/curl-command-tu ... mple-usage

http://www.thegeekstuff.com/2012/07/wget-curl

I tried it with the file below as an experiment

Code: Select all

curl -O http://www.openss7.org/repos/tarballs/strx25-0.9.2.1.tar.bz2
And it downloaded it to Home.

Once installed you can run

Code: Select all

curl --help
or

Code: Select all

curl --manual
which are probably both worth reading and would answer all your questions.

It seems quite powerful and I personally wouldn't use it too much without knowing what I was doing first.

alex.theoto
Posts: 13
Joined: 2014-12-17 16:50

Re: Cannot download with curl

#3 Post by alex.theoto »

Now I get it.
In my first attempt, the provided .iso link pointed into another link, which is showed as html file. Then I had to use the new .iso link.
From
I had to go to
Well, it was obvious since there was a message
<p>The document has moved <a href=
.
Thank you very match for your example links. Problem solved.

Post Reply