Download whole page from terminal

You can install it with brew install wget or sudo port install wget.

For downloading files from a directory listing, use -r (recursive), -np (don’t follow links to parent directories), and -k to make links in downloaded HTML or CSS point to local files (credit @xaccrocheur).

wget -r -np -k http://www.ime.usp.br/~coelho/mac0122-2013/ep2/esqueleto/
Other useful options:

-nd (no directories): download all files to the current directory
-e robots.off: ignore robots.txt files, don’t download robots.txt files
-A png,jpg: accept only files with the extensions png or jpg
-m (mirror): -r –timestamping –level inf –no-remove-listing