[SunHELP] ftp recursively

Clarte Everett sunhelp at sunhelp.org
Wed Jul 18 21:53:31 CDT 2001


Hi,

Try to use ncftp, it is easy to use and it will get subdirectories as
well.

rgds,
cla

Message: 12
To: sunhelp at sunhelp.org
From: dhansen at zebra.net
Subject: RE: [SunHELP] ftp recursively.
Date: Wed, 18 Jul 2001 20:01:45 GMT
Reply-To: sunhelp at sunhelp.org


 I'm sorry, I was in a hurry when I replied earlier and
didn't finish. A couple of other replies pointed out
that the stock ftp client won't do this auotmagically for
you. You can do it interactively, however by using the
ftp client commands (like the "prompt off" example) to
create the subdirs. Otherwise you would need to use a
different application for ftp'ing.

 Here's a very quick example of what I mentioned above
(it's hurried because I'm about to leave town for a few
days)

cd /home/user/testftp
ftp -i some.ftp.net
ls -la
mget *   (only gets current dirs files (not subdirs)
!mkdir subdir1
!mkdir subdir2/sub-subdir2
mget * (still behaves as above)
mget */* (grabs files under first level of subdirs
           and puts them in their corresponding
            subdirs under /home/user/testftp/dir1/subdirs)
mget */*/* (like above, but works on 2nd level of subdirs
             i.e.- subdir2/sub-subdir2 level)

 But as is obvious, this method requires interaction on
your part and there are ftp clients that _will_ do this
automatically for you. This is good if you either don't
want another ftp client (and don't mind the interaction)
or are unable to add another ftp client to the system.

 -david






More information about the SunHELP mailing list