Pages

Friday, June 23, 2017

10 Wget (Linux File Downloader) Command Examples in Linux

In this post we are going to review wget utility which retrieves files from World Wide Web (WWW) using widely used protocols like HTTPHTTPS and FTPWget utility is freely available package and license is under GNU GPL License. This utility can be install any Unix-like Operating system including Windows and MAC OS. It’s a non-interactive command line tool. Main feature of Wget of it’s robustness. It’s designed in such way so that it works in slow or unstable network connections. Wget automatically start download where it was left off in case of network problem. Also downloads file recursively. It’ll keep trying until file has be retrieved completely.
Linux Wget Command Examples
10 Linux Wget Command Examples
First, check whether wget utility is already installed or not in your Linux box, using following command.
# rpm -qa wget
wget-1.12-1.4.el6.i686
Please install it using YUM command in case wget is not installed already or you can also download binary package at http://ftp.gnu.org/gnu/wget/.
# yum -y install wget
The -y option used here, is to prevent confirmation prompt before installing any package. For more YUM command examples and options read the article on 20 YUM Command Examples for Linux Package Management.

1. Single file download

The command will download single file and stores in a current directory. It also shows download progresssizedate and time while downloading.
# wget http://ftp.gnu.org/gnu/wget/wget-1.5.3.tar.gz
--2012-10-02 11:28:30--  http://ftp.gnu.org/gnu/wget/wget-1.5.3.tar.gz
Resolving ftp.gnu.org... 208.118.235.20, 2001:4830:134:3::b
Connecting to ftp.gnu.org|208.118.235.20|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 446966 (436K) [application/x-gzip]
Saving to: wget-1.5.3.tar.gz
100%[===================================================================================>] 446,966     60.0K/s   in 7.4s
2012-10-02 11:28:38 (58.9 KB/s) - wget-1.5.3.tar.gz

2. Download file with different name

Using -O (uppercase) option, downloads file with different file name. Here we have given wget.zip file name as show below.

      ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
                                                    ► Read more: http://adf.ly/1n6Z76
      ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬

No comments:

Post a Comment