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.
The curl-wget Venn diagram
71–80 of 159 posts
Re: The curl-wget Venn diagram
#72I 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…
Just the fact that `wget url` downloads a URL and saves it makes it a winner for me in command-line use.
Re: The curl-wget Venn diagram
#73Earlier 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.)
Re: The curl-wget Venn diagram
#74Earlier 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.
Re: The curl-wget Venn diagram
#75Earlier quoted context omitted.
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.
well, depends on the usecase. sometimes you want the whole url, like when i want to mirror a site and it has stuff like foo.html?page=1 foo.html?page=2 ... 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.
However, if the potential issues can be resolved with sane defaults, I think this would be a great new switch to add.
Re: The curl-wget Venn diagram
#76wget's "downloads recursively" is worth half the features of curl.
Re: The curl-wget Venn diagram
#77Curl can fetch over imap/imaps? Can I use it to download and back up my entire mailbox?
Re: The curl-wget Venn diagram
#78I 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.
Re: The curl-wget Venn diagram
#79Don’t know what the advantages/disadvantages are, but it comes with the default install. It’s usually what I use.