Belajar Sendiri

Commands

curl

curl [-sSIv] [--connect-timeout N] <url>

Risk: Safe

What it does

Speaks HTTP with a web counter and prints its reply.

When to use it

To test a page, its status code and headers, with no browser.

Example

$ curl -sI localhost

Only the top of the reply: status and headers.

$ curl -v localhost/menu.html

The whole talk: > is what curl said, < the reply.

$ curl -sS --connect-timeout 5 kedai.example

Give up after 5 seconds, not about 2 minutes.