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
- Download file in the background:
1 | wget -b [URL] |
Check the information of the downloading:
1 | tail -f wget-log |
- Download file and change the name
1 | wget -O [name] [URL] |
- 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:
- GNU Wget 1.20 Manual
- 每天一个linux命令(61):wget命令