How to check the download speed for URL’s

Posted: 6p in Linux

How to check the download speed for URL’s

[@im ~]$ curl http://www.centos.org > centos-org.html
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 24813 0 24813 0 0 114k 0 –:–:– –:–:– –:–:– 303k

2. Save the cURL Output to a file

We can save the result of the curl command to a file by using -o/-O options.

-o (lowercase o) the result will be saved in the filename provided in the command line
-O (uppercase O) the filename in the URL will be taken and it will be used as the filename to store the result

Note: When curl has to write the data to the terminal, it disables the Progress Meter, to avoid confusion in printing. We can use ‘>’|’-o’|’-O’ options to move the result to a file.

[@im ~]$ curl -o mygettext.html http://www.gnu.org/software/gettext/manual/gettext.html
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1217k 100 1217k 0 0 708k 0 0:00:01 0:00:01 –:–:– 803k

[@im ~]$ curl -O http://www.gnu.org/software/gettext/manual/gettext.html
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1217k 100 1217k 0 0 684k 0 0:00:01 0:00:01 –:–:– 768k

3. Fetch Multiple Files at a time

We can download multiple files in a single shot by specifying the URLs on the command line.

$ curl -O URL1 -O URL2

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s