Retrieving a bunch of files with wget


I periodically need to retrieve new CentOS and Fedora releases. Sometimes I need to snag CDs (I still support machines without DVD drives), and in other cases I need DVDs. Typically when I’m playing around with new releases I grab both, and use the wget to retrieve them all at once. If you pass wget a FTP URL that contains a *, it will retrieve all of the files in the directory you are retrieving files from. Here is an example:

$ wget ftp://foo/pub/centos/5.6/isos/x86_64/

This will grab all of the files in the x86_64 directory and place them in the current working directory. You can also disable prompting and use the mget command with your favorite FTP client, but I find wget to be a bit more versatile since you can use the ”-c” option to continue failed transfers. What is your favorite method to retrieve files?

This article was posted by Matty on 2011-05-13 17:25:00 -0400 EDT