7 ms·
>Wget requires no extra options to simply download a remote URL to a local file, while curl requires -o or -O. However trivial, this fact is often mentioned to
by statictype 17y ago
>Wget requires no extra options to simply download a remote URL to a local file, while curl requires -o or -O. However trivial, this fact is often mentioned to me when people explain why they prefer downloading with wget.
Funny because that's exactly the reason I installed macports and then wget. It's stupidly trivial, but there you have it.
- telemachos 17y agoI'm not criticizing, but wouldn't a simple alias be easier? alias co='curl -O'
- statictype 17y agoTrue, much simpler. I guess a larger reason would be that 7+ years of using wget has wired me to its commandline. I'm so used to typing `wget -c "<middle-click>"` or something on the command line, that I just never considered creating aliases for alternatives.
- mahmud 17y ago'co' is already taken though :-)
- X-Istence 17y agoWith what? I've got no such alias here.
- randallsquared 17y agoMaybe he aliases that to a vcs checkout command, like 'svn co'?
- cabacon 17y agoco and ci are the old RCS commands, and they're why you can do "cvs co" and "cvs ci" with CVS.
- pavel_lishin 17y agoAlright, alias wget='curl -O'
- rix0r 17y agoAnother stupidly trivial reason: I can type 'wget' and then do command-V entirely with my left hand, keeping my right hand on the mouse. Having to type 'curl' would require me to move my hand back and forth, slowing me down.
- Groxx 17y agoI love reasons like this, they make non-geeks look at us like we're insane. I've only used curl personally, so this wouldn't be enough to switch, but it's an excellent point.
- technomancy 17y agoWhereas the true geeks look at you like you're crazy for still using crufty old QWERTY. =)
- oconnore 17y agoBash fu? alias qwer='curl -o'
- godDLL 17y agoI'm guessing QWERTY? Dvorak and Colemak are not too good for single-hand typing.
- danudey 17y agostupid unix tricks: curl http://somesite.com/download/latest.tar.gz http://somesite.com/download/latest.tar.gz | tar zx (saves having temporary files lying around everywhere)
- Freaky 17y agoOS X probably ships with FreeBSD's fetch(1), which should do for most <command> <url> needs.
- Malus 17y agomini[~ 111] uname -a Darwin mini.local 10.3.0 Darwin Kernel Version 10.3.0: Fri Feb 26 11:58:09 PST 2010; root:xnu-1504.3.12~1/RELEASE_I386 i386 mini[~ 112] which fetch fetch: Command not found. Unfortunately, it does not. I use fetch all of the time on FreeBSD, so it is a little obnoxious to have to go and install wget from MacPorts.
- sumeeta 17y agoWget seems to be better at naming saved files: `curl -O http://host/my%20file.txt` http://host/my%20file.txt` annoyingly saves to `my%20file.txt` while `wget http://host/my%20file.txt` http://host/my%20file.txt` will save to `my file.txt`.
- Kadin 17y agoI don't think it's all that trivial; whatever a program does when run without options should be a big clue towards the primary use case that it is designed to handle or fulfill. In the case of curl, it writes to stdout; wget writes to a file. While the mechanics of each are the same, curl lends itself towards use in scripts while wget (at least in my experience) is better if you're kicking it off interactively. Also, wget has a very handy batch mode, where you can feed it a file containing nothing but a list of URLs and it will fetch each one. I am not familiar with a similar one for curl -- although admittedly you could do the same thing with a minimal wrapper script, that's a lot more keystrokes than "wget -i <file>".