Language Selection

English French German Italian Portuguese Spanish

CLI Magic: Use cURL to measure Web site statistics

Filed under
HowTos

cURL is a handy command-line network tool whose name stands for "client for URLs," but think of it as a "copy for URLs" -- it can copy to or from a given URL in any of nine different protocols.

Although cURL is sometimes misconceived as an updated wget, that's wrong. The two utilities do share some features and options, but are distinctly different tools; wget is for downloading files from the Web, and is best used to mirror entire sites or parts of sites -- which is something that cURL alone can't do.

cURL's job is to copy data to or from a given set of URLs; along with HTTP it recognizes the FTP, TFTP, GOPHER, TELNET, DICT, LDAP, FILE, HTTPS, and FTPS protocols. Other features include support for proxies, forms, cookies, SSL, client-side certificates, URL globbing, and very large files. Along with the curl command-line tool is a counterpart library, libcurl, that you can use to get cURL's functionality from within your own programs.

You can do a lot of neat tricks with curl. Here's a look at how you can copy to and from URLs, and then use cURL's reporting facilities to get simple Web server metrics from your operations.

Full Story.

More in Tux Machines

Today in Techrights

Web Server Setup Series - Fix CWP Errors & Warnings To Improve Server Security

​Welcome to the second part of the web server setup series. In this part, I'll show you how to fix CWP (CentOS web panel) errors and warnings, create new user accounts, create hosting packages, and create FTP account. So let's start. Read
more

How To Make Good Use Of 'grep' Command

​Linux and UNIX systems come with a shell command known as ‘grep’. This simply looks for a specified text, or pattern, in a file or an entire directory. The most common usage is for quickly searching a file for occurrences of a pattern, which can be in plain text, or in the form of a regular expression. Here, the patterns used will be simple text rather than regular expressions. Read
more

Android Leftovers