Click to See Complete Forum and Search --> : FTP- has to be an easier way


fantasma
07-03-2001, 12:52 PM
Hey All,

I'm new to command line ftp. I want to "get" a directory and all of its subdirectories and files. What is the command for doing this? I looked at the man page for ftp and tried "mget" and although the ftp command prompt returned with no errors, the directory I wanted wasn't downloaded. Thoughts?

Much Appreciated,

fantasma

EyesWideOpen
07-03-2001, 02:10 PM
I'm not sure that it's possible to "get" an entire directory and it's subdirectories and their files using command line ftp transfer. You may have to recreate that directory structure locally and then go into each directory separately. In each directory you could do mget * and this will get all of the files (not directories) in that directory one by one pending your confirmation.

[ 03 July 2001: Message edited by: EyesWideOpen ]

dj525
07-03-2001, 04:53 PM
I can't speak from experience as I have never even installed linux on my system yet. I just bought slackware and hope to get it set up this weekend :)
Anyway, I don't have a direct answer for you fant, but I can tell you that it IS possible to get files AND directories simultaneously via the mget command according to the nhf at this (http://www.linuxnewbie.org/nhf/intel/shells/bas6.html#ftp) page of this website. So there must be a way to get more info on that command besides with man. Perhaps do a search on the net?

[ 03 July 2001: Message edited by: dj525 ]

rachaelz
07-03-2001, 06:45 PM
Hi,

This is actually something that I've run into as well. Real drag to have to do a multiple file get in each seperate directory and child directories. I'll check back to see if anyone comes up with anything. MUST be a way to do it.

Rachael

bdg1983
07-03-2001, 06:58 PM
Have you tried 'mget *'? Not sure if it will d/l directories although the ftp NHF does say that mget can also d/l directories.

mrob
07-03-2001, 10:38 PM
Use "tar" to archive the directory tree and "get" to download.

godot
07-03-2001, 10:49 PM
use a program called ncftp, you can get packages for any distro if you don't have it installed.

read the man page for it and you're good to go

dj525
07-03-2001, 11:36 PM
You probably already know this, but I was just reading a little more about the ftp, and there is also a seperate help file available by simply typing help while at the ftp prompt vs. using "man ftp".

fantasma
07-05-2001, 01:28 PM
Hey All,

Thanks a million for the replies. I'll try some of these out.

-Cheers

bdl
07-05-2001, 02:04 PM
The correct command to get a directory structure recursively is usually

mget -R *

-or-

mget -r *


Under the traditional 'ftp' utility I believe you have to answer y|n to the transfer and under NCFTP it automatically grabs the dir. Another neat option with NCFTP is tar-on-the-fly where it tars the entire dir and grabs that one large file. Give it a shot.