5 ms·
What is the biggest usage of Curl? I am new to Linux,sorry.
by du_bing 10y ago
What is the biggest usage of Curl? I am new to Linux,sorry.
- AstroJetson 10y agoData transfer by many protocols using URLs. See their website https://curl.haxx.se https://curl.haxx.se for details. Super tool, we use it all the time for file transfers
- gnur 10y agoI use for a few things, almost every day. Getting my outgoing ip address (to check net connectivity): curl ip.mydomain.net or (to force ipv4) curl -4 ip.mydomain.net To check how a page redirects: curl -v example.com (shows headers) Interacting with elasticsearch, mainly showing indexes and their health: curl localhost:9200/_cat/indices
- SturgeonsLaw 10y agoIt's handy for giving an API endpoint a slap without needing a scripting language
- erelde 10y agoFile transfers, getting http headers, getting html content of a page piping it to a script to clean it up and read later (long articles). That's what I use it for, I think, mainly. Edit: also between php scripts
- hannob 10y agoThe biggest usage is probably not the tool itself, but the library. It's the de-facto-standard-HTTP-library (although it does more than just HTTP). E.g. if you have a PHP script that downloads some data from another webpage it very often does this with curl.
- thejosh 10y agoApart from the oodles of software that depends on curl/libcurl, my favourite thing is to "Copy as cURL" from a Chrome request.
- dorfsmay 10y agoOr Firefox, but yes, first to debug all web bugs!
- 72deluxe 10y agoThe underlying library (libcurl) is extremely useful on all platforms, not just Linux.
- SFJulie 10y agocurl is a trusted way to execute unsafe code on the internet https://gnu.moe/wallofshame.md https://gnu.moe/wallofshame.md
- geofft 10y ago"curl | sh" is no worse than "wget && tar xf && ./configure". I have yet to see anyone who knows how to audit a configure script generated by GNU autoconf, which is generally a multiple-tens-of-thousands-of-line monstrosity that generates a bunch of C files and compiles and runs them. FUD about "curl | sh" isn't rooted in any sensible security modeling. As a general rule of thumb, if you think everyone around you is independently doing something stupid, you should first pursue the hypothesis that it is your reasoning that is flawed and not the entire rest of the world's.
- feld 10y agoBut you're verifying the signature of the tarball first, right?
- geofft 10y agoAlmost all of the examples on that page use curl https:// https:// | sh. Which, again, makes it a superior option to wget && gpg --verify && ./configure; I have yet to see anyone who is better at PGP fingerprint verification than their OS's SSL stack is at TLS certificate verification. (There are a very small number of people who are as good, but not better.)
- dorfsmay 10y agoIt's used to send an http/HTTPS reqeuests, controlling every aspect of it, form headers to cookies, to ignoring/not SSL certs, and has advanced debugging option to show you the entire dialog (-sv) and use a different IP address (--resolve to test you firewalls, LBs etc...).
- sglane 10y agoIt sure does quite a lot and I love it, but I wish it could handle SIP and WebSockets without too much trouble.
- 0xmohit 10y agoI find it very useful for debugging. For example, when you have a web server that redirects requests saying: curl --verbose --location URL or even curl --trace --location URL provides the desired information.