Linux wget for downloading

wget for downloading files in Terminal.

When I was doing my summer project, I should download the datasets into the server. To achieve this, I used the wget and records the infor of this command by this chance.

Introduction of wget

GNU Wget is a free utility for non-interactive download of files from Web. It supports HTTP, HTTPS, and FTP protocols, as well as retrieval through HTTP proxies.

Non-interactive means that it can work in the background.

To invoke:

1
wget [option]… [URL]…

Some more about Using

  1. Download file in the background:
1
wget -b [URL]

Check the information of the downloading:

1
tail -f wget-log
  1. Download file and change the name
1
wget -O [name] [URL]
  1. Download multiple files
1
wget -i filelist.txt

The filelist.txt should have the urls of the targets files.

To unzip the .tar.gz file, use the command tar. See the blog Linux tar for unzipping.

Reference:

  1. GNU Wget 1.20 Manual
  2. 每天一个linux命令(61):wget命令