<mohammadrony>

curl

Common usage

Internet facing ip address (public)

curl ifconfig.me

Options

Quite mode

curl -s www.example.com

Save in specific name

curl -o filename www.example.com

Save in remote name

curl -O www.example.com

Visit redirected url

curl -L www.example.com

Get response code

curl -I www.example.com

Multiple request

curl http://localhost/path[1-3]
curl http://localhost/path{1,2,3}
curl http://localhost/path{1,2,3}/subpath[1-3]

Using xargs

seq 5 | xargs -I{} curl http://localhost/path{}

Issue 500 requests with 5 always going in parallel

seq 100 | xargs -P5 -I{} curl http://localhost/path{}