8 ms·
I do find myself using wget to download things because I don't have to remember the curl option to follow redirects, and wget saves the file using the same name
by tyingq 7y ago
I do find myself using wget to download things because I don't have to remember the curl option to follow redirects, and wget saves the file using the same name as the last bit of the uri.
- dijit 7y agocurl follows redirects, `curl -O` is functionally identical to wget. Unless I'm missing something in your statement.
- deepersprout 7y ago> curl follows redirects, `curl -O` is functionally identical to wget. No it's not :) You need to `curl -LO`. See for example github releases: curl -LO https://github.com/S2-/gitlit/releases/download/v1.4.1/gitlit-1.4.1.tar.gz downloads the tar.gz, while curl -O https://github.com/S2-/gitlit/releases/download/v1.4.1/gitlit-1.4.1.tar.gz will download an html file. Even better would be to use `curl -LOJ`, so if the filename is not in the url, but in the `Content-Disposition filename` http response header, curl would get the filename from there.
- tyingq 7y agoPretty good overview of why I just use wget for such things.
- tyingq 7y ago"because I don't have to remember the curl option to follow redirects"
- swiley 7y agocurl follows standard redirects but there are a couple of fairly common redirects that it doesn't. --Someone who built a browser on libcurl
- why-oh-why 7y agoWhich makes sense. cURL is a relatively “dumb” request tool. Same goes for youtube-dl versus wget. The latter is a relatively “dumb” download tool.