Friday, 5 January 2018

Linux from the command line - curl vs wget

Linux from the command line - curl vs wget

One of the great things about Linux is that you always have lots of options, lots of choice as to how to do things. wget and curl are great examples of two options to do the same job.
I use wget almost daily myself, mostly because it came out before curl and I got used to using it. They both have their advantages and disadvantages so learn them both and use them each as appropriate.
https://www.maketecheasier.com/curl-vs-wget/

8 comments:

  1. I've always been been partial to wget because it's almost trivial to use. The documentation is clear and the commands are easy to understand even if you are doing something weird. Curl... I've tried curl, but I don't get it.

    ReplyDelete
  2. I wrote that before reading the article. My experience with curl has mostly been related to things that have it half assed integrated and I have to fix something, or doing something wget can't do. You have to get pretty weird before you get there though.

    ReplyDelete
  3. Eric Muller I feel exactly the same. To me they typify the difference in thinking between classic Unix/Linux tools and modern ones.
    Another one is ifconfig vs ip, the former is simple to use with sensible options and readable output. The latter is overly complex and has confusing output.

    ReplyDelete
  4. Eric Muller and I posted my first comment before reading your second. ;')
    But your point still stands.

    ReplyDelete
  5. It's easier to integrate curl into other things though. Even just from the command line. You can pipe the data all over the place. I guess you can probably do that with wget, but I don't think it's quite as amenable to that.

    ReplyDelete
  6. Eric Muller well, my rule of thumb is wget for the shell, curl for scripts.

    ReplyDelete
  7. I have to say I end up doing the same as Christopher Gaul​. wget in the shell, basically because it's the one I remember and curl in scripts as it is technically more secure.

    ReplyDelete
  8. Yup, I just find wget easier to use to whip up a quick download in the shell, and if you have to automate, then take the time to reference all the commands and options for curl to put in a script.

    ReplyDelete