25

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 name@foo.com:password http://www.example.com 

What is the difference between -v and -vvv?

Jonathan Callen
  • 11,301
  • 2
  • 23
  • 44
pbaranski
  • 22,778
  • 19
  • 100
  • 117

5 Answers5

41

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.

deltheil
  • 15,496
  • 2
  • 44
  • 64
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.

avivamg
  • 12,197
  • 3
  • 67
  • 61
3

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

Marisa D
  • 31
  • 1
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).

Mattias Backman
  • 927
  • 12
  • 25
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.

deltaray
  • 382
  • 3
  • 16