Live data from Hacker News

The curl-wget Venn diagram

daniel.haxx.se

91–100 of 159 posts

Re: The curl-wget Venn diagram

#92
post #9

For me the killer feature of wget is that by default it downloads a file with a name derived from the url. You do: wget url://to/file.htm and a file named "file.htm" appears in your cwd. Using curl, you would have to do curl url://to/file.htm > file.htm or some other, less ergonomical, incantation.

I’ve always seen this as a misfeature of wget, on the general principle that command-line utilities should write their principal result to stdout unless otherwise instructed.

[dead]

Re: The curl-wget Venn diagram

#93

Earlier quoted context omitted.

You recall incorrectly. curl's -C flag does not work as-is. You must specify the offset from where it should continue. Why doesn't it take the resumed file's existing length as the guess by default? What else could the user want outside of some very exotic cases? Yes, I want retries. They should be the default for a user-facing tool. Try searching the curl's manual page for "retry". There are no less than 5 different…

I thought that `-C -` checks the output file for the offset

Yes it does. How does the wget --continue work?

Re: The curl-wget Venn diagram

#96
post #10

Earlier quoted context omitted.

curl -O https://curl.se/docs/manpage.html#-O

Also -OJ : with -O you get the name derived from the URL (the initial one, I think, even if redirects are being followed), with -OJ you get the one from the Content-Disposition header or the final URL, the way browsers do it. Of course, plain -O is safer. (For parity with Wget, you might also want to add -R to set the downloaded file’s mtime according to the Last-Modified header.)

-OJ is nice but doesn't work with -C- for some reason

Re: The curl-wget Venn diagram

#97
post #85

Earlier quoted context omitted.

You recall incorrectly. curl's -C flag does not work as-is. You must specify the offset from where it should continue. Why doesn't it take the resumed file's existing length as the guess by default? What else could the user want outside of some very exotic cases? Yes, I want retries. They should be the default for a user-facing tool. Try searching the curl's manual page for "retry". There are no less than 5 different…

> You recall incorrectly. curl's -C flag does not work as-is. You must specify the offset from where it should continue. Why doesn't it take the resumed file's existing length as the guess by default? What else could the user want outside of some very exotic cases? But... it does, though. From the man page ( https://curl.se/docs/manpage.html#-C ) > Use "-C -" to tell curl to automatically find out where/how to resume…

No, `-C -` is not a flag. It is specifying the `-C` argument with obscure special value of `-`, which causes curl to determine the offset to continue from the output file length. This might be obvious to you if you are well-versed in curl command line, but it's by no means expected or obvious like a simple flag.

> But curl is perfectly capable of resuming downloads automatically, you're just (very arrogantly) wrong on that one.

I've never claimed it doesn't. I've only demonstrated that the default options don't do it and enabling the behaviour is more difficult than it maybe should be for a simple tool. I fail to see the arrogance.

Re: The curl-wget Venn diagram

#98
Neat. Love it.

Is there a feature matrix to Venn diagram converter?

(Deep down) on my To Do list is comparing Ansible, Puppet, Chef, Docker, etc.

Which ultimately means some kind of feature matrix, right?

With a converter, we'd get Venns for free.

Re: The curl-wget Venn diagram

#100

Earlier quoted context omitted.

You don't need much of anything, it's just another tool to help people figure stuff out. If you've already invested the time in reading through the manuals for these tools then maybe you don't get much out of something like ChatGPT, but consider that there's thousands of new people entering the industry every year and the number of tools which they're expected to learn to use has increased over time.

It's fine when you've read the man page at least once . If you just cowboy your way through every task, you'll never even be aware of what your tools can do. Which results in comments we've all seen: "I can't believe curl/Firefox/vim/readline/whatever can do something like that!" about something so trivial that every good poweruser/sysadmin has known it for decades (because it's in the man page ).

Sure, but that's knowledge you pick up over years. You can't reasonably expect people to frontload all of it on the first pass with every single tool they interact with, especially when starting off.

I've read through most of the man pages of every tool I use at least once, but it has taken me years, and I've done it incrementally.

Post reply on HN