This quick article will be elementary to most SysAdmins, but really useful for newcomers.
Whenever you want to install the latest software to your server, do you find that you download the archive to your local machine, only to then copy it to the server, move to the correct directory, unzip, install, etc?
Today, I’ll show you how to bypass a lot of the effort using the amazing tool, wget.
I’ve logged into the server using SSH and navigated to the directory I want. Now I can copy my archive right into the directory I’m at. The command is so easy it’s mind-blowing:
$ wget http://wordpress.org/latest.tar.gz
Hit return and the magic happens:
-2013-08-29 10:23:56-- http://wordpress.org/latest.tar.gz
Resolving wordpress.org... 220.127.116.11, 18.104.22.168
Connecting to wordpress.org|22.214.171.124|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 4028740 (3.8M) [application/x-gzip]
Saving to: “latest.tar.gz”
100%[===================================>] 4,028,740 2990K/s in 1.2s
2013-08-29 10:24:01 (2758 KB/s) - “latest.tar.gz” saved [4028740/4028740]
And you have the latest.tar.gz archive right there in your directory. I’ve just used WordPress as an example, but you can do this for anything! Off you go.