Live data from Hacker News

Curl vs. Wget

daniel.haxx.se

91–100 of 205 posts

Re: Curl vs. Wget

#91
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 -- -- |…

I recommend using this script[1] and aliasing it to "man". Saves so much time over loading man pages and searching through them. For example, with it aliased to "man", you can run "man wget continue" or "man find -exec" and get just the relevant parts of the man page. And "man git commit -a" also works, despite the separated command name.

1: https://gist.github.com/alphapapa/3cba3ff196147ad42bac

Re: Curl vs. Wget

#92
post #22

Earlier quoted context omitted.

curl -C - -O filename url -C continues from an offset; "-C -" uses the length of the output file as the offset.

That's what I tried a couple years ago and it failed. Might try it again some time.

I guess it's possible that the server didn't support HTTP byte serving via Accept-Ranges:, either for that particular resource or altogether.

Re: Curl vs. Wget

#93

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.

Haven't found anything better than axel to saturate the link yet.

Try saldl[1]. It depends on libcurl. So protocol support should be good and reliable.

[1] https://github.com/saldl/saldl

Re: Curl vs. Wget

#94

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…

The article is not coming up for me. Perhaps it's ycombinated. Anyway I agree curl is more of a developer tool although using it to download files is not the first thing that comes to mind. I use it daily to identify caching issues and redirect issues. The -SLIXGET flags in particular are very useful for this.

Yeah I've been doing some libcurl development today .... Online docs have been unavailable all day ..

Re: Curl vs. Wget

#95
post #85
post #70

Earlier quoted context omitted.

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.

What is your Windows command-line environment? Plain CMD prompt or Cygwin? Or something else?

I don't get agree with your parent, but I used cygwin when I was on Windows and it mostly does what you want if you just need basic command line tools.

The major annoyances were packages were limited, compiling anything was generally a disaster and file permissions between linux/windows are a mess. I happily used it everyday though.

Re: Curl vs. Wget

#97
post #72

Earlier quoted context omitted.

for example, in troubleshooting with a bluecoat proxy, I can run a curl session in conjuction with grep to check for very specific types of traffic and leave that script open while I might have an end user test.

Sorry, can't imagine what you mean. Do you just start curl with a list of urls to process and grep for errors? Any specific examples?

it acts like a live packet capture of a log file.

not sure how else to describe other than I do not think wget is capable of such functionality.

Re: Curl vs. Wget

#100
post #97

Earlier quoted context omitted.

Sorry, can't imagine what you mean. Do you just start curl with a list of urls to process and grep for errors? Any specific examples?

it acts like a live packet capture of a log file. not sure how else to describe other than I do not think wget is capable of such functionality.

sooo... "wget -O - .... | grep ..." ?
Post reply on HN