With the @- in the command curl --data-binary @- ... you're asking curl to read from stdin. That means the command will not do anything and not complete until you press CTRL-D. However, if you press CTRL-D, it will send the data to the server.
It is possible to specify the data to send without reading it from stdin. That can be done via curl --data-binary <data>, with <data> being the JSON to send. Note that it needs to be valid JSON and correctly escaped in the shell you use. '{name: "carname"}' from the above example is no correct JSON (the quotes around attribute name name are missing). It should rather be '{"name": "carname"}'.
As @yojimbo87 pointed out, insert operations should be sent via HTTP POST rather than PUT, and the collection name should be passed as a URL parameter.
Here is the full command:
curl -X POST --data-binary '{"name": "carname"}' --dump - "http://localhost:8529/_db/testdb/_api/document?collection=cars"
The above will work in Bash, however, it won't work from the Windows command-line because strings there shouldn't be enclosed in ', but rather ".