curl-users
RE: curl enhancement requests
Date: Thu, 19 Apr 2001 11:25:47 +0200
> If you want a simpler progress display than the default, try the
> --progress-bar option.
I think he wants curl to print the statistics just once, after the transfer
is finished, not a progress meter.
Try this:
curl --write "Downloaded %{size_download} bytes in %{time_connect} seconds
(%{speed_download} bytes/s)" http://www.mysite.com
This will print a nice little statistics text after the transfer is done.
The possible variables are:
url_effective The URL that was fetched last. This is
mostly meaningful if you've told curl to
follow location: headers.
http_code The numerical code that was found in the
last retrieved HTTP(S) page.
time_total The total time, in seconds, that the
full operation lasted. The time will be
displayed with millisecond resolution.
time_namelookup
The time, in seconds, it took from the
start until the name resolving was com
pleted.
time_connect The time, in seconds, it took from the
start until the connect to the remote
host (or proxy) was completed.
time_pretransfer
The time, in seconds, it took from the
start until the file transfer is just
about to begin. This includes all pre-
transfer commands and negotiations that
are specific to the particular proto
col(s) involved.
size_download The total amount of bytes that were
downloaded.
size_upload The total amount of bytes that were
uploaded.
size_header The total amount of bytes of the down
loaded headers.
size_request The total amount of bytes that were sent
in the HTTP request.
speed_download The average download speed that curl
measured for the complete download.
speed_upload The average upload speed that curl mea
sured for the complete upload.
See the man page for more details.
/Linus
Received on 2001-04-19