Operating System - HP-UX
1837090 Members
2713 Online
110112 Solutions
New Discussion

Re: how to copy complete directory

 
Ramana.Sv
Frequent Advisor

how to copy complete directory

Hi,

how to copy set of directories using ftp ? is it possible?????
10 REPLIES 10
Hasan  Atasoy
Honored Contributor

Re: how to copy complete directory

hi ramana;
it is not possible . on the client side you have to tar desired directory. after ftp tar file you have to extract it.


Hasan.
Viswanadhan
Regular Advisor

Re: how to copy complete directory

Hi Ramana,

Through ftp command it's impossible. But u can try with third party tools for windows like "reflection", "ftp command", etc..

This way helps us.

Regards,
Viswa.
Robert-Jan Goossens
Honored Contributor

Re: how to copy complete directory

Or indirect using tar.

example /home/goossens

# cd /home
# tar cvf goossens.tar goossens
ftp the tar file and untar it.

Regards,
Robert-Jan
Dennis Handly
Acclaimed Contributor

Re: how to copy complete directory

You can of course use mput/mget * to copy all of the files. (After turning off the prompt with the prompt command.)

This can't recursively copy subdirectories.

As Hasan and Robert-Jan have mentioned, using tar/pax is probably the best since that will restore the user/group, permissions and time.

Steven Schweda
Honored Contributor

Re: how to copy complete directory

Depending on your requirements, wget may be
useful. It can do recursive FTP (or HTTP[S])
fetch operations.

http://www.gnu.org/software/wget/wget.html

> it is not possible .

There may be a difference between "I don't
know how" and "It's not possible".
Sp4admin
Trusted Contributor

Re: how to copy complete directory

I would agree with Robert. Just create a tar ball of that direcroty and the ftp/sftp to the server you wish to copy to and untar the tar ball.

sp,
Geoff Wild
Honored Contributor

Re: how to copy complete directory

Anything is possible...

Easiest way is to create a tar ball of your directories, then use sftp or scp to copy to other server(s).

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
A. Clay Stephenson
Acclaimed Contributor

Re: how to copy complete directory

Another options is to use the ftpcopy client rather than the standard ftp client. Ftpcopy will recursively copy files.

http://hpux.its.tudelft.nl/hppd/hpux/Networking/FTP/ftpcopy-0.3.5/
If it ain't broke, I can fix that.
Steven Schweda
Honored Contributor

Re: how to copy complete directory

> Just create a tar ball [...]

> Easiest way is to create a tar ball [...]

This may be easy if you have more than FTP
access to the system where the files reside.
Unfortunately, the original statement of the
problem was far from complete, and different
people may make different assumptions for the
missing bits, none of which may be closely
tied to the actual situation.

> Anything is possible...

This is obviously not true. _Many_ things
are possible.
Mark J McDonald
Frequent Advisor

Re: how to copy complete directory

you can use remsh or ssh and something like:

tar cvf - directories | remsh host tar xvf -