I would also add at least "sane default options", "continues downloads" and "retries on error" to the Wget column. I recently had to write a script that downloads a very large file over a somewhat unreliable connection. The common wisdom among the engineers is that you need to use Wget for this job. I tried using curl but out of the box it could not resume or retry the download. I would have to study the manual and s…
For downloading large files I would rather just use aria2c TBH.
The curl-wget Venn diagram
31–40 of 159 posts
Re: The curl-wget Venn diagram
#32Earlier quoted context omitted.
Both tools have their use-cases. I think with the advent of LLMs like ChatGPT it has also become a lot easier to get the proper command line incantation for whatever tool you're using. Even if you've read the manual previously, it's easy to forget the exact flags you want to use, and validating the generated command line is usually less effort than having to build it up yourself from scratch by reading the manual. Wi…
I just look at my curl / wget note for some sane examples. i cant believe one needed chatgpt to be productive
Re: The curl-wget Venn diagram
#33Earlier quoted context omitted.
Yeah, but: wget "url://to/file.htm?uid=foo&q=bar&rnd=4"
`&unused=.htm`. It usually works.
I'd prefer wget to be a bit more clever when handling URLs query strings though, but I guess changing this behavior now might break some scripts.
Re: The curl-wget Venn diagram
#34Earlier quoted context omitted.
Both tools have their use-cases. I think with the advent of LLMs like ChatGPT it has also become a lot easier to get the proper command line incantation for whatever tool you're using. Even if you've read the manual previously, it's easy to forget the exact flags you want to use, and validating the generated command line is usually less effort than having to build it up yourself from scratch by reading the manual. Wi…
I just look at my curl / wget note for some sane examples. i cant believe one needed chatgpt to be productive
Re: The curl-wget Venn diagram
#35I would also add at least "sane default options", "continues downloads" and "retries on error" to the Wget column. I recently had to write a script that downloads a very large file over a somewhat unreliable connection. The common wisdom among the engineers is that you need to use Wget for this job. I tried using curl but out of the box it could not resume or retry the download. I would have to study the manual and s…
> I tried using curl but out of the box it could not resume or retry the download. Maybe I'm misunderstanding, but curl has exactly that feature, it's the `-C` flag. If you want retries, there's `--retry`. I find curls defaults pretty sane, personally, I wouldn't want either of those by default for a tool like curl.
Re: The curl-wget Venn diagram
#36For 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.
curl -O https://curl.se/docs/manpage.html#-O
Yes. But the GP said by default.
Re: The curl-wget Venn diagram
#37Earlier quoted context omitted.
curl -O https://curl.se/docs/manpage.html#-O
I much prefer the fact that curl doesn't do this by default (but has the option), it much closer matches the behavior of most unix-y tools. Makes it so much easier to put it into pipelines.
For me, I usually want to download files and I'm usually not doing any more processing, so I tend to type in *wget" first.
Re: The curl-wget Venn diagram
#38For 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.
Re: The curl-wget Venn diagram
#39Re: The curl-wget Venn diagram
#40Earlier quoted context omitted.
`&unused=.htm`. It usually works.
At this point you might as well use the -o option (-o file.htm). It's easier and easier to understand. I'd prefer wget to be a bit more clever when handling URLs query strings though, but I guess changing this behavior now might break some scripts.
wget does have options to use the name proposed by the server, and so another option to remove the query arguments would be useful, and in line with those.