1833582 Members
3620 Online
110061 Solutions
New Discussion

Re: FTP dir ?

 
SOLVED
Go to solution
Vlad_11
Frequent Advisor

FTP dir ?

Hi,
Can I FTP the whole dir instead of separate files. Or I can just zip the whole dir and ftp .zip.
I need to transfer the whole dir into onother box.

Thanks
V
beer or not beer
4 REPLIES 4
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: FTP dir ?

The mget (or mput) ftp command is your boy.
e.g.

cd /xxx/yyy
prompt # toggle y/n questions for each file off
mget *

That will get all the files on the remotehost under directory /xxx/yyy.
If it ain't broke, I can fix that.
Steven E. Protter
Exalted Contributor

Re: FTP dir ?

You can go either way.

The disadvantage of zipping it up is need shell access at the receiving end to unzip.

What I like to do is exhange public keys and use password free scp to tranfer directories.

scp -rp /dir hostname:/target_dir

Works very well and can be password free with openssh/secure shell.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Vlad_11
Frequent Advisor

Re: FTP dir ?

Clay,
Thansk, will cd xxx/yyy will work if I need transfer to onother host/IP ?

Thanks to all

V
beer or not beer
A. Clay Stephenson
Acclaimed Contributor

Re: FTP dir ?

In that case your ftp commands after the ftp login would be:

lcd /local/srcdir # local cd for source directoty
cd /remote/destdir # remote cd for destination directory
prompt # turn of y/n prompts
mput *
quit


If it ain't broke, I can fix that.