Curl vs. Wget
11–20 of 205 posts
Re: Curl vs. Wget
#12"Wget can be typed in using only the left hand on a qwerty keyboard!" I love both of these, but wish that curl was just like wget in that the default behavior was to download a file, as opposed to pipe it to stdout. (Yes, aliases can help, I know.)
Streaming to stdout is more Unix-y, allowing you to pipe the response into further processes. For example: curl http://api.example.com/json | jq '.["someKey"]' # etc., etc.
Or maybe there's a good reason for having two tools :)
Re: Curl vs. Wget
#13It's not going to replace curl or wget usage, but it is a nicer interface in certain circumstances.
Re: Curl vs. Wget
#14Earlier quoted context omitted.
I use wget for downloads because it follows links by default and resume is just -c. I never figured out how to make curl do the equivalent of -c.
I don't think you can: "[Wget's] ability to recover from a prematurely broken transfer and continue downloading has no counterpart in curl."
curl -C - -O filename url
-C continues from an offset; "-C -" uses the length of the output file as the offset.Re: Curl vs. Wget
#15Re: Curl vs. Wget
#16I instinctively go to `wget` when I need to, uhm, get the file into my computer[1]. `curl -O` is a lot more effort :P Other than that, curl is always better. [1] Aliasing `wget` to ~`curl -O` might be a good idea :)
I use wget for downloads because it follows links by default and resume is just -c. I never figured out how to make curl do the equivalent of -c.
$ man curl | wc -l
1728
$ man wget | wc -l
1096
How about the --help output? $ curl --help | wc -l
178
$ wget --help | wc -l
176
The wget help is nicer, grouping options together by category and with longer text. curl just has a long list of options in alphabetical order. How many (long) options do they have? $ curl --help | grep -- -- | wc -l
175
$ wget --help | grep -- -- | wc -l
137
I'd say it is a lot quicker to work out the flags etc you need with wget because there is less to look through.Re: Curl vs. Wget
#17"Wget can be typed in using only the left hand on a qwerty keyboard!" I love both of these, but wish that curl was just like wget in that the default behavior was to download a file, as opposed to pipe it to stdout. (Yes, aliases can help, I know.)
Streaming to stdout is more Unix-y, allowing you to pipe the response into further processes. For example: curl http://api.example.com/json | jq '.["someKey"]' # etc., etc.
curl http://bogus.example.com/install | sudo bashRe: Curl vs. Wget
#18Earlier quoted context omitted.
I use wget for downloads because it follows links by default and resume is just -c. I never figured out how to make curl do the equivalent of -c.
Lets compare the length of the man page: $ man curl | wc -l 1728 $ man wget | wc -l 1096 How about the --help output? $ curl --help | wc -l 178 $ wget --help | wc -l 176 The wget help is nicer, grouping options together by category and with longer text. curl just has a long list of options in alphabetical order. How many (long) options do they have? $ curl --help | grep -- -- | wc -l 175 $ wget --help | grep -- -- |…
You want the `wget --help` text over the man page, 99% of the time. The other 1%, you want the full info manual. The man page is an awful mix between the two; too dense for scanning through for the flag you need, but not containing the full information when you need specifics.
Re: Curl vs. Wget
#19"Wget can be typed in using only the left hand on a qwerty keyboard!" I love both of these, but wish that curl was just like wget in that the default behavior was to download a file, as opposed to pipe it to stdout. (Yes, aliases can help, I know.)
Streaming to stdout is more Unix-y, allowing you to pipe the response into further processes. For example: curl http://api.example.com/json | jq '.["someKey"]' # etc., etc.
EDIT: Wow, surprised by the downvotes. I don't think I said anything controversial (y'know principle of least surprise and all), but maybe I was being a bit too opaque: wget, by virtue of being the first on the scene, built an expectation that $THING_THAT_GETS_URLS would result in a file without any other input/arguments. Curl, to this day, surprises me because I was around when wget was all you had.
Re: Curl vs. Wget
#20Curl scripts allow open connection to view all new logs in a session. can wget do similar? I did not know it can or could however from my point of view if it cannot this is like comparing a philips head screwdriver to a powertool with 500pc set.