Curl is one of those quintessential *nix tools that adheres beautifully to the “one tool, one task” philosophy.
curl exists to give us the ability to issue requests against web servers. As sysadmins we’re usually concerned with how the web server responds to requests rather than how the actual page renders so a CLI tool like
curl is quick and easy. It also lets us spoof things like user agents and referers in case we want to see how the web site responds to different browsers or different referers.
Let’s look at this site:
$ curl http://slumpedoverkeyboarddead.com | head
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>Slumped Over Keyboard Dead</title>
<meta name="description" content="That's how they'll find me one day..." />
<meta name="HandheldFriendly" content="True" />