Monday, May 22, 2023

How to download file using wget and curl command in linux ?

Download file using wget and curl command in linux 




[root@0.0.0.0 ~]# rpm -qa | grep -i wget

wget-1.19.5-11.el8.x86_64

[root@0.0.0.0 ~]#


Using wget commnad :


[root@0.0.0.0 ~]#

[root@0.0.0.0 ~]# wget https://the.earth.li/~sgtatham/putty/latest/putty-0.78.tar.gz

--2023-05-22 15:44:09--  https://the.earth.li/~sgtatham/putty/latest/putty-0.78.tar.gz

Resolving the.earth.li (the.earth.li)... 93.93.131.124, 2a00:1098:86:4d:c0ff:ee:15:900d

Connecting to the.earth.li (the.earth.li)|93.93.131.124|:443... connected.

HTTP request sent, awaiting response... 302 Found

Location: https://the.earth.li/~sgtatham/putty/0.78/putty-0.78.tar.gz [following]

--2023-05-22 15:44:10--  https://the.earth.li/~sgtatham/putty/0.78/putty-0.78.tar.gz

Reusing existing connection to the.earth.li:443.

HTTP request sent, awaiting response... 200 OK

Length: 2811628 (2.7M) [application/x-gzip]

Saving to: ‘putty-0.78.tar.gz’


putty-0.78.tar.gz               100%[=====================================================>]   2.68M  4.71MB/s    in 0.6s


2023-05-22 15:44:10 (4.71 MB/s) - ‘putty-0.78.tar.gz’ saved [2811628/2811628]


[root@0.0.0.0 ~]#



Using curl command :


[root@0.0.0.0 tmp]# curl -O https://the.earth.li/~sgtatham/putty/latest/putty-0.78.tar.gz

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current

                                 Dload  Upload   Total   Spent    Left  Speed

100   306  100   306    0     0   1066      0 --:--:-- --:--:-- --:--:--  1066

[root@0.0.0.0 tmp]#

[root@0.0.0.0 tmp]#


No comments:

Post a Comment