Monday, March 5, 2012

Using wget to download recursively from the FTP site

The content of the articles is taken from Man Page and  How to download recursively from an FTP site

Here is some useful commands from the articles.

Option 1: Recursive with depth
$ wget -r --level=99 ftp://userid:password@ftp.mysite.com/
* The default is --level=5

Option 2: Mirroring
$ wget -m ftp://userid:password@ftp.mysite.com/
This option turns on recursion and time-stamping, sets infinite recursion depth and keeps FTP directory listings.

Option 3:  Mirroring in the background
$ nohup wget -m ftp://userid:password@ftp.mysite.com &

Option 4: Preserve local files and avoid overwritting. Use --no-clobber option
$ wget -nc -m ftp://userid:password@ftp.mysite.com/

No comments: