Getting all files from a web page using curl I would like to get all files from the web page below using curl:
http://www.ime.usp.br/~coelho/mac0122-2013/ep2/esqueleto/
I tried:
curl http://www.ime.usp.br/~coelho/mac0122-2013/ep2/esqueleto/
It returned a bunch of lines in the terminal, but didn't get any file.
Use wget instead.

Install it with Homebrew: brew install wget or  MacPorts: 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
-nc, --no-clobber: Skip download if files exist