iEFdev

Code, Computers & Random Junk

Install Wget in OS X

wget is a must for me. It’s really good, and easy to use. Saves o lot of time and work when downloading files since wget is downloading the file to the directory you’re in. So, here’s how to install wget in OS X.

First we’ll create a source folder. In Terminal:

mkdir -p ~/source
cd ~/source

…and here we go:

curl -O http://ftp.gnu.org/gnu/wget/wget-1.16.tar.gz
tar -xzvf wget-1.16.tar.gz
cd wget-1.16
./configure --with-ssl=openssl
make
sudo make install

openssl must be set to avoid errors.

Cleaning up a bit:

rm -rf ~/source

If you want to test it:

which wget
#Should output: /usr/local/bin/wget

Make sure /usr/local/bin/ is in your PATH

Usage

When downloading a file just simply enter:

wget http://www.example.com/foo/bar.zip

It downloads to the same folder you’re in.

Another way to use it is to download/mirror your HTML site.

wget -r --convert-links http://www.mysite.com/

Comments