Transferring directory trees over ftp

Gian Zas
April 19, 2009 | < 1 min read

Imagine all the people having to live without ssh and an assigned job related to hosting migrations with low bandwidth access, what a painfull world…

Ok, get up! it was only a nightmare, but if a strange reason causes you must accomplish that task you may wish get/put directories recursively from/to a ftp server.

The bad news are that the FTP protocol doesn’t supports this operation, you can get only an individual file or a group of files that expands some wildcard expression, but you can’t get/put recursively an entire directory.

Luckily ncftp saves the day, it’s a free ftp client (free as in beer and free as non-private), that supports many features like background processing and directory tree copy.

So, to GET the contents a whole directory tree just invoke ncftpget command:

* -R copy a whole directory
* is the remote ftp server
* /home/yyy is the local destination
* and /remote_xx is the ftp directory to be transfered

PUT a directory is trivial too, just invoke the ncftpput command:

be happy!

Get our stories delivered to your inbox weekly.