Downloading files from internet in command line is possible with the "wget" command. You can download any file from web like softwares, rpm packages, music files, etc with its web url. Many linux operating systems have wget preinstalled with. wget can download files with http, https and ftp protocols.
Check if wget is preinstalled on your linux
[root@server ~]# rpm -q wget
wget-1.12-1.4.el6.x86_64
If not, Install wget from YUM repository
[root@server ~]# yum -y install wget
Download a file with wget from http
[root@server ~]# wget http://example.com/file.zip
Wget with Username and password (http)
[root@server ~]# wget --http-user=USER --http-password=PASS http://example.com/file.zip
Download a file with wget from https
[root@server ~]# wget https://example.com/file.zip
Download a file with wget from ftp
[root@server ~]# wget ftp://example.com/file.zip
Wget with Username and password (FTP)
[root@server ~]# wget --ftp-user=USER --ftp-password=PASS ftp://example.com/file.zip
Download multiple files with wget
[root@server ~]# wget http://example.com/file1.zip http://example.com/file2.zip
Check if wget is preinstalled on your linux
[root@server ~]# rpm -q wget
wget-1.12-1.4.el6.x86_64
If not, Install wget from YUM repository
[root@server ~]# yum -y install wget
Download a file with wget from http
[root@server ~]# wget http://example.com/file.zip
Wget with Username and password (http)
[root@server ~]# wget --http-user=USER --http-password=PASS http://example.com/file.zip
Download a file with wget from https
[root@server ~]# wget https://example.com/file.zip
Download a file with wget from ftp
[root@server ~]# wget ftp://example.com/file.zip
Wget with Username and password (FTP)
[root@server ~]# wget --ftp-user=USER --ftp-password=PASS ftp://example.com/file.zip
Download multiple files with wget
[root@server ~]# wget http://example.com/file1.zip http://example.com/file2.zip
0 comments:
Post a Comment