ftp recursively

Paul Rubin http
Wed Mar 19 02:47:27 EDT 2008


Jeff Schwab <jeff at schwabcenter.com> writes:
> ftping it as a flat file, and untarring it on the other side.  Of
> course, the motivation wasn't just to get the files from point A to
> point B using Unix (which I already know how to do), but to take
> advantage of an opportunity to learn some Python; next time, I'll try
> the ftpmirror.py script if it's generic enough, or ftplib if there are
> more specific requirements.

I see, that wasn't clear in your original post.  You should look at
the os.walk function if you want to know how to traverse a directory
tree (maybe you are already doing this).  Also, for security reasons,
it's getting somewhat uncommon, and is generally not a good idea to
run an ftpd these days, even on a LAN.  It's more usual these days
to transfer all files by rcp or rsync tunnelled through ssh.



More information about the Python-list mailing list