What is meaning of -vvv option in cURL request
Asked Answered
P

5

29

According to cURL documentation http://curl.haxx.se/docs/manpage.html

-v, --verbose

Makes the fetching more verbose/talkative.

But I came across

curl -vvv -u [email protected]:password http://www.example.com 

What is the difference between -v and -vvv?

Peptide answered 25/6, 2014 at 7:18 Comment(0)
S
44

tl;dr: there is no difference between -v and -vvv.

Specifying -v multiple times usually means to increase verbosity accordingly.

This is true, e.g for a software like memcached:

-v            verbose (print errors/warnings while in event loop)
-vv           very verbose (also print client commands/reponses)
-vvv          extremely verbose (also print internal state transitions)

(behind the scenes the options parser accumulates the level of verbosity).

But with curl command-line tool this is not the case. As you can see from tool_getparam.c, passing -v simply toggles the so-called trace type to TRACE_PLAIN. Passing -vv or -vvv does the same.

Sleigh answered 26/6, 2014 at 8:40 Comment(0)
F
4

Easiest way to remember - vvv in most tools such as tcpdump is "very very verbose"

It becomes a habit to use it with other tools even if it is no different than - v so that is why you may see it mentioned against cURL

Foilsman answered 30/6, 2020 at 12:12 Comment(0)
J
3

explanation : -v (--verbose flag) is useful for debugging and getting extra information about the response from server. Single v is just Enough.

From Curl documentation :

-v, --verbose

Makes curl verbose during the operation. Useful for debugging and seeing what's going on "under the hood". A line starting with '>' means "header data" sent by curl, '<' means "header data" received by curl that is hidden in normal cases, and a line starting with '*' means additional info provided by curl.

If you only want HTTP headers in the output, -i, --include might be the option you're looking for.

If you think this option still doesn't give you enough details, consider using --trace or --trace-ascii instead.

Johnathan answered 14/5, 2020 at 8:5 Comment(0)
P
2

Specifying -v multiple times usually means to increase verbosity accordingly. So in this case you'd expect a very verbose output (-v specified three times).

Pe answered 25/6, 2014 at 7:21 Comment(0)
P
2

This seems to be some sort of myth. According to Daniel Stenberg (the author of curl) in this thread, curl does not and never has supported using more than one v to increase verbosity, but many people seem to think that it does.

Parliamentary answered 30/3, 2020 at 3:26 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.