Archive for the ‘Linux Command Line’ Category

Linux: How to recursively download contents of an FTP directory

Tuesday, March 8th, 2011

I was looking for a quick way to recursively download the entire FTP directory for a site that we are transferring. This was, I found, the easiest and most straightforward way:

On the command line interface, assuming you have wget installed, type:

wget -r ftp://USERNAME:PASSWORD@mysite.com/

Hit enter and wait while it retrieves everything for you.

I did it this way because I didn’t want to download 4gb of data to upload again, so ran this command direct from the ‘production’ server with its stupidly fast internet connection. Hours and hours saved!