Operating System - HP-UX
1825775 Members
2045 Online
109687 Solutions
New Discussion

mget folder and it contents

 
Fauziah Mahdan
Super Advisor

mget folder and it contents

HI all,
Stupid and simple question and yet I dun't know.
What is the command to get folder and it content via ftp

Thanks
Fauziah
4 REPLIES 4
A. Clay Stephenson
Acclaimed Contributor

Re: mget folder and it contents

We don't say folder in UNIX-speak; folder is a concept for another OS but using ftp you can do:
prompt
mget *

and that will get all the files under a given directory; however, to recursively get a directory and its files and subdirectories a better answer is the ftpcopy command, which you can get here:
http://hpux.connect.org.uk/hppd/hpux/Networking/FTP/ftpcopy-0.3.5/
If it ain't broke, I can fix that.
Bill Hassell
Honored Contributor

Re: mget folder and it contents

ftp does not have the ability to get directories and files. mget can be used to match files within a directory but nothing below. You'll need to use a smart ftp program. The porting centre has a number of ftp clients:

http://hpux.connect.org.uk/hppd/cgi-bin/search?package=on&description=on&term=ftp&Search=Search


Bill Hassell, sysadmin
Torsten.
Acclaimed Contributor

Re: mget folder and it contents

Another (and better) tool is "scp".
This is part of the openssh package.

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
susee_sundar
Regular Advisor

Re: mget folder and it contents

Hi .,

Condider U want to Copy the files & folder from server 192.168.10.10

/data/dir

ftp 192.168.10.10
Password:
>cd /data
>mget dir
<< all the files starts uploading to local system >>
>bye
$ls

<< YOU WILL find the directory is copied to your loal folder >>

Surya...