Download Speed cURL
wget saves to a file by default; cURL by default outputs to STDOUT (meaning your screen). You need to specify that it should be outputting to a file. You can do this with the -o
(aka --output
) switch, or with shell redirection:
# switch to the curl command
curl ftp://someserver.com/path/to/file -o output.filename.here
# shell redirection
curl ftp://someserver.com/path/to/file > output.filename.here
The slowness probably is due more to the output going to the terminal screen than your network speed; once you redirect the output to a file you should see download speeds roughly equivalent to what you got with wget
.
Related videos on Youtube
Ibn Ar-Rashid
I am a Muslim. Currently a student, Islamic studies is my focus. Computing (mainly on Linux) is a hobby.
Updated on September 18, 2022Comments
-
Ibn Ar-Rashid over 1 year
I am having a bit of problem using cURL to download using FTP, that is to say I think it's being rather slow if working at all. I usually use wget an this one file which I downloaded earlier with wget started and finished under 10 minutes. The size was about 200 MB, a Linux distribution. I tried it later on with cURL, first time using it, and all I did was type in the FTP address after the cURL command as I would with wget. I started seeing the source code and everything, but it's been like an hour and it still hasn't finished, is this normal? My connection seems fine, as fast as it's supposed to be. I would appreciate if someone who uses cURL or knows about it extensively could explain the matter.
-
Currently using: Ubuntu 9.10/Windows 7, Crunchbang 9.04/Windows XP.
-
Marcin over 14 yearsWhat's the exact command you used, what switches if any?
-
quack quixote over 14 yearsi did the same thing my first time using curl; it's just a different tool with different defaults, that's all.
-
-
quack quixote over 14 yearsbad server is possible, but i think it's more likely due to outputting to the terminal. remember terminal output speeds are on the order of analog POTS modems -- 9600 baud, 14400, etc. your TTY's baud rate is probably specified in /etc/inittab (if it's a real TTY; not sure where pseudo-TTYs are defined).
-
John T over 14 yearsThis sounds like the case. I'm sure we've all made this mistake at some point or another and had the terminal bark at us, +1 :)
-
John T over 14 yearsYeah that likely is the problem, it seems we were both commenting each other's answers at the same time! Just some alternate possibilities that may add to it.
-
quack quixote over 14 yearsnp. you're not wrong, i just took advantage of your answer to point out the actual term speeds. :)
-
Marcin over 14 yearsThat's why in my comment I asked him what switches he used when he ran it ;)
-
Ibn Ar-Rashid over 14 yearsThanks, it was a stupid mistake on my part thinking it must work the same way as wget, should have read the manuals first.
-
Marcin over 14 yearsI guess he did, I must have missed it.