Live data from Hacker News

Curl vs. Wget

daniel.haxx.se

61–70 of 205 posts

Re: Curl vs. Wget

#61
post #30
post #26

Though only briefly mentioned in this article at the buttom, I'd like to give a huge shoutout to aria2. I use it all the time for quick torrent downloads, as it requires no daemon and just seeds until you C-c. It also does a damn good job at downloading a list of files, with multiple segments for each.

+1 for aria2. It's like the VLC of command-line download tools - it Just Works with anything. https://aria2.github.io/

Also can be installed with brew.

Re: Curl vs. Wget

#62
post #47
post #35

Earlier quoted context omitted.

Looks like a frontend to curl that has wget's defaults would be useful.

Merge the code, hard link the filenames to the same executable and get it to change behavior based on the name it's invoked under.

Sounds like a lot of complexity for no benefit.

Re: Curl vs. Wget

#63
post #39

For my usage: * Wget's the interactive, end-user tool, and my go-to if I just need to download a file. For that purpose, its defaults are more sane, its command line usage is more straightforward, its documentation is better-organized, and it can continue incomplete downloads, which curl can't. * Curl's the developer tool-- it's what I'd use if I were building a shell script that needed to download. The command line…

Doesn't curl -C continue an incomplete download? Regardless agree that wget is better for just downloading a file.

-C requires you to specify the byte offset, and you also need --append or >> so it's not quite the same.

Re: Curl vs. Wget

#64
post #47

Earlier quoted context omitted.

Merge the code, hard link the filenames to the same executable and get it to change behavior based on the name it's invoked under.

Sounds like a lot of complexity for no benefit.

Either tool can provide the functionality of the other with a little work, is what I meant to imply...

Re: Curl vs. Wget

#65
post #7

Earlier 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 -- -- |…

> help is nicer, grouping options together by category ... vs ... long list of options in alphabetical order.

Honestly, either is good. Grouping options is good if you don't know what you're looking for, and alphabetical is good if you do. The bad ones are like the help page for rsync - a ton of options, with no semantic ordering at all.

Re: Curl vs. Wget

#66

Also putting this out there—for nicer REST API interaction on the CLI, and a little more user-friendliness, you might also want to add HTTPie[1] to your toolbelt. It's not going to replace curl or wget usage, but it is a nicer interface in certain circumstances. [1] https://github.com/jkbrzt/httpie

This is an extremely minor quibble, but the dependency on Python makes me less inclined to use it. I'm stuck on Windows for a lot of the work I do so configuring Python is never fun and there is no one line installation method from what I can tell. Putting it up on chocolatey[0] might be a good idea. Not sure how feasible that is however. [0] https://chocolatey.org/packages?q=httpie

Should have lead that comment with "I'm on Windows, so".

Of course it's going to be miserable to use any command-line tool on Windows. It's Windows.

Re: Curl vs. Wget

#67
post #39

Earlier quoted context omitted.

Doesn't curl -C continue an incomplete download? Regardless agree that wget is better for just downloading a file.

-C requires you to specify the byte offset, and you also need --append or >> so it's not quite the same.

Actually no. From the manpage:

Use "-C -" to tell curl to automatically find out where/how to resume the transfer. It then uses the given output/input files to figure that out.

Re: Curl vs. Wget

#68
If nobody's tried it, axel mentioned in the report as possibly abandoned has the awesome feature of splitting a download in to parts and then establishing that many concurrent TCP connections. Very useful on individual TCP flow rate-limited networks.

Re: Curl vs. Wget

#69

Also putting this out there—for nicer REST API interaction on the CLI, and a little more user-friendliness, you might also want to add HTTPie[1] to your toolbelt. It's not going to replace curl or wget usage, but it is a nicer interface in certain circumstances. [1] https://github.com/jkbrzt/httpie

This is an extremely minor quibble, but the dependency on Python makes me less inclined to use it. I'm stuck on Windows for a lot of the work I do so configuring Python is never fun and there is no one line installation method from what I can tell. Putting it up on chocolatey[0] might be a good idea. Not sure how feasible that is however. [0] https://chocolatey.org/packages?q=httpie

+1; I likely wouldn't be able to just jump on any host and copy/paste some commands that worked from my laptop with this, but I can do that with curl and assume that it's installed and of a reasonably serviceable version basically everywhere I'd be.

Re: Curl vs. Wget

#70

Earlier quoted context omitted.

This is an extremely minor quibble, but the dependency on Python makes me less inclined to use it. I'm stuck on Windows for a lot of the work I do so configuring Python is never fun and there is no one line installation method from what I can tell. Putting it up on chocolatey[0] might be a good idea. Not sure how feasible that is however. [0] https://chocolatey.org/packages?q=httpie

Should have lead that comment with "I'm on Windows, so". Of course it's going to be miserable to use any command-line tool on Windows. It's Windows.

I'm not sure why you feel like that, I switched back to Windows after ~1 year of using OSX, I wouldn't say its "miserable" there is really nothing I could do in OSX's command line that can't do in windows.
Post reply on HN