
Tips on using the Curl Command in Linux - axiomdata316
https://www.tecmint.com/linux-curl-command-examples/
======
maxxxxx
Working with Windows mainly it always amazes me how powerful the command line
tools in Linux are. Most Windows programmers don't know much about command
line so downloading some files is a huge affair. If you know curl it's just so
easy.

~~~
saagarjha
That’s why I find it hard to convince people how annoying it is to use Windows
for software development. It’s hard to miss what you aren’t aware of.

~~~
jstarks
We are working hard to fix this. We ship Curl (and ssh and bsdtar) in Windows
10, and you can use WSL to run whatever Linux tools you want.

~~~
jdhendrickson
I really appreciate your work, it's made my day to day so much better.

You have a true once in a life time opportunity with how badly Apple is
screwing the hardware pooch, if your hardware division could put out a laptop
to rival the retina Macbook pro with up to date hardware and an excellent
command line ecosystem you could very well shift an entire generation away
from OsX.

Thanks for all the hard work I'm using Linux for windows right now.

~~~
saagarjha
> You have a true once in a life time opportunity with how badly Apple is
> screwing the hardware pooch, if your hardware division could put out a
> laptop to rival the retina Macbook pro with up to date hardware and an
> excellent command line ecosystem you could very well shift an entire
> generation away from OsX.

Surface?

------
maxnoe
`curl URL/File.tar.gz | tar xz`

Download and decompress in one go

------
Yuioup

      curl -C - -O http://yourdomain.com/yourfile.tar.gz
    

Why the dash between the -C and -O?

~~~
jdhendrickson
From the man page. Use "-C -" to tell curl to automatically find out where/how
to resume the transfer. It then uses the given output/input files to figure
that out.

~~~
saagarjha
Correct me if I’m wrong, but usually “-“ is used (at least in my experience,
which is strongly biased towards compilers) as an argument to signify input
comes from standard in rather than a file.

~~~
scolby33
That's generally true in my experience too, but in this case the parent is
correct. Ctrl-F "\--continue-at" [0].

[0]
[https://curl.haxx.se/docs/manpage.html](https://curl.haxx.se/docs/manpage.html)

~~~
saagarjha
Yeah, I get that they're right. I just wanted to share my surprise that curl
changes this "convention", though I guess it's to be expected because curl
doesn't really take input anyways.

------
kwhitefoot
A lot of services are using OAuth (or OAuth2) and I haven't been able to
figure out how to use curl with such services. Can anyone point me at a good
tutorial for using curl with Flickr in particular?

~~~
canhascodez
I would probably not reach for curl as my first tool to interact with OAuth v2
datasources. Flickr seems to have a wide variety of available libraries[0],
and they also have API documentation. Is there a good reason to use curl
rather than something else?

[0]
[https://www.flickr.com/services/api/](https://www.flickr.com/services/api/)

~~~
kwhitefoot
Curl is easily used in shell scripts.

------
based2
SMTP send heap buffer overflow
[https://curl.haxx.se/docs/adv_2018-70a2.html](https://curl.haxx.se/docs/adv_2018-70a2.html)

------
g5095
don't. use httpie ;p

~~~
fivre
httpie lacks a complete feature set in some cases, though day-to-day it's much
nicer. I'll trade cURL's (admittedly clunky) --resolve, which is still
necessary in some situations, for having native JSON pretty printing most of
the time

I also like that it's Python and I can probably change something in its source
more easily and quickly than I can with cURL.

