Earlier quoted context omitted.
Yes the server would need to support it. The request is made via a HTTP header (Range[1] IIRC). Also, I wouldn't consider that a stupid question. :) [1] https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#Rang...
This is also how download accelerators worked (back in the late nineties, early naught's), by having different connections work at several ranges to maximize bandwidth usage.
Curl vs. Wget
191–200 of 205 posts
Re: Curl vs. Wget
#192My favorite use of wget: mirroring web documentation to my local machine. wget -r -l5 -k -np -p https://docs.python.org/2/ Rewrites the links to point local where appropriate, and the ones which are not local remain links to the online documentation. Makes for a nice, seamless experience while browsing documentation. I also prefer wget to `curl -O` for general file downloads, simply because wget will handle redirects…
https://docs.python.org/2.7/download.html
(you can also find archives for Python 3 and SciPy and NumPy)
Re: Curl vs. Wget
#193aria2 is much more reliable when downloading stuff, especially for links which involve redirections. For example here's a link to download 7zip for windows from filehippo.com. Results: * Curl doesn't download it at all. curl -O 'http://filehippo.com/download/file/bf0c7e39c244b0910cfcfaef2af45de88d8cae8cc0f55350074bf1664fbb698d/' gives: curl: Remote file name has no length! * Wget manages to download the file, but wit…
No client can get this right, always. aria2c is not more reliable. It's just choosing to take the filename from the redirect URL. It appears to be the right thing to do in this case. But it would fail if the start URL was actually the one that had the right filename.
Hosts can use the Content-Disposition header if they want to make sure all (capable) clients get the right filename.
In saldl, I implemented `--filename-from-redirect` to handle your use-case. But It's not set by default.
Re: Curl vs. Wget
#194curl for checking http headers simply with: curl -vskL http:1.2.3.4 -H "Host: example.com" > /dev/null
Why don't you just use the -I flag?
Re: Curl vs. Wget
#195I use curl because it is generally installed. I prefer not to install wget, especially on customer machines because it stops 90% of script kiddies. For some reason wget is the only tool they will attempt to use to download their sploit.
Pretty sure skiddies will not assume most victims have wget already, they'll just ship it with the exploit. If not installing wget is an annoyance to a hacker, they're already in too deep ;)
They try wget, fail, and move on.
Re: Curl vs. Wget
#196Earlier quoted context omitted.
Huh. I've always thought of them as the opposite - wget is the full featured spidering tool, curl is the easy to run one when I need a command line thing or to bang web stuff into a janky copy and paste workflow.
This is interesting. Do you want to give your reasons or is it just an arbitrary habit?
curl is a unix-way type program that interacts with standard out in a pretty predictable way.
Re: Curl vs. Wget
#197Earlier quoted context omitted.
> 'curl' is 'cat url', Whoa... TIL something! I don't know if that's the official etymology, but that's a great mnemonic! EDIT: ... and yes, I use both tools :).
Well, it looks like I was taught wrong, and it's not 'cat URL' (though that's a good way to think of it), but the rather more direct-to-STDOUT-sounding 'see URL'. TIL something too :) https://en.wikipedia.org/wiki/CURL
Re: Curl vs. Wget
#198aria2 is much more reliable when downloading stuff, especially for links which involve redirections. For example here's a link to download 7zip for windows from filehippo.com. Results: * Curl doesn't download it at all. curl -O 'http://filehippo.com/download/file/bf0c7e39c244b0910cfcfaef2af45de88d8cae8cc0f55350074bf1664fbb698d/' gives: curl: Remote file name has no length! * Wget manages to download the file, but wit…
The URL does not work right now. But I tried another one from the same site. No client can get this right, always. aria2c is not more reliable. It's just choosing to take the filename from the redirect URL. It appears to be the right thing to do in this case. But it would fail if the start URL was actually the one that had the right filename. Hosts can use the Content-Disposition header if they want to make sure all…
Re: Curl vs. Wget
#199Earlier quoted context omitted.
curl is the one where I have to remember whether to use -o or -O when trying to download a file with the original filename and just use wget instead because it's faster than reading the curl man page.
I have the same problem. Curl is "unix-y" in the sense that the default options are optimized for a shell script and make no sense for interactive usage. bropages is where it's at for that kind of stuff. curl is actually their usage example :) http://bropages.org/
Re: Curl vs. Wget
#200Earlier quoted context omitted.
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'm glad I typed `man wget` instead of `wget --help`" -- no one ever You want the `wget --help` text over the man page, 99% of the time. The other 1%, you want the full info manual. The man page is an awful mix between the two; too dense for scanning through for the flag you need, but not containing the full information when you need specifics.