How do you print received cookie info to stdout with curl?

You get that error because you use in the wrong way that option. When you see in a man page an option like:

-c, --cookie-jar <file name>

this mean that if you want to use that option, you must to use -c OR --cookie-jar, never both! These two are equivalent and, in fact, -c is the abbreviated form for --cookie-jar. There are many, many options in man pages which are designed in the same way.

In your case:

curl -c - 'http://google.com'

--cookie-jar is given as argument for -c option, so, it’s interpreted as a file name, not like an option (as you may think), and - remains alone which leads to error because curl, indeed, doesn’t have such an option.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)