Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Curl - What is outputed to the terminal?

Tags:

curl

I know that part of the terminal output is duration of the request, time remaining, etc. But is there some documentation that specifies exactly what each column of the terminal output of a curl command is? The man page is very sparse as to what is there.

like image 728
phileas fogg Avatar asked Oct 31 '11 15:10

phileas fogg


People also ask

What is curl on terminal?

Client URL (cURL, pronounced “curl”) is a command line tool that enables data exchange between a device and a server through a terminal. Using this command line interface (CLI), a user specifies a server URL (the location where they want to send a request) and the data they want to send to that server URL.

Does curl write to stdout?

Curl writes all cookies previously read from a specified file and all cookies received from remote server(s). If no cookies are known, no file will be written. The file will be written using the Netscape cookie file format. If you set the file name to a single dash ("-"), the cookies will be written to stdout.

How do you hit curl in terminal?

Most Linux distributions have cURL installed by default. To check whether it is installed on your system or not, type curl in your terminal window and press enter. If it isn't installed, it will show a “command not found” error.


1 Answers

It is possibly not easy to find, but it is documented in the curl book.

  The progress meter exists to show a user that something actually is
  happening. The different fields in the output have the following meaning:

  % Total    % Received % Xferd  Average Speed          Time             Curr.
                                 Dload  Upload Total    Current  Left    Speed
  0  151M    0 38608    0     0   9406      0  4:41:43  0:00:04  4:41:39  9287

  From left-to-right:
   %             - percentage completed of the whole transfer
   Total         - total size of the whole expected transfer
   %             - percentage completed of the download
   Received      - currently downloaded amount of bytes
   %             - percentage completed of the upload
   Xferd         - currently uploaded amount of bytes
   Average Speed
   Dload         - the average transfer speed of the download
   Average Speed
   Upload        - the average transfer speed of the upload
   Time Total    - expected time to complete the operation
   Time Current  - time passed since the invoke
   Time Left     - expected time left to completion
   Curr.Speed    - the average transfer speed the last 5 seconds (the first
                   5 seconds of a transfer is based on less time of course.)

  The -# option will display a totally different progress bar that doesn't
  need much explanation!
like image 78
Daniel Stenberg Avatar answered Sep 19 '22 14:09

Daniel Stenberg