Unix/Linux Go Back    


HP-UX HP-UX (Hewlett Packard UniX) is Hewlett-Packard's proprietary implementation of the Unix operating system, based on System V.

FTP the whole file structure

HP-UX


Closed    
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 07-31-2014   -   Original Discussion by madmacher
madmacher's Unix or Linux Image
madmacher madmacher is offline
Registered User
 
Join Date: Jul 2010
Last Activity: 22 August 2014, 5:29 AM EDT
Location: wiltshire
Posts: 5
Thanks: 2
Thanked 0 Times in 0 Posts
FTP the whole file structure

Hi
I need to ftp the whole file structure from various unix servers to a windows server
I have a sub script for each machine and am using
ftp -is:../%name%_prog.bat -i %server% on the windows side.

The problem then comes with the mget command
it gets all the files , but puts them in one directory, and so I loose the structure.

Is these a way I can ftp all the files and keep the sub directories etc

Thanks
MadMacher
Sponsored Links
    #2  
Old Unix and Linux 07-31-2014   -   Original Discussion by madmacher
MadeInGermany's Unix or Linux Image
MadeInGermany MadeInGermany is online now Forum Staff  
Moderator
 
Join Date: May 2012
Last Activity: 22 April 2018, 8:20 AM EDT
Location: Simplicity
Posts: 4,036
Thanks: 346
Thanked 1,357 Times in 1,223 Posts
Get Norton Commander or Midnight Commander,
it handles FTP file system like native file systems - a recursive copy between them is one mouse click.
Did you try it with the Windows Explorer by using a ftp://server/folder location?
Sponsored Links
    #3  
Old Unix and Linux 07-31-2014   -   Original Discussion by madmacher
madmacher's Unix or Linux Image
madmacher madmacher is offline
Registered User
 
Join Date: Jul 2010
Last Activity: 22 August 2014, 5:29 AM EDT
Location: wiltshire
Posts: 5
Thanks: 2
Thanked 0 Times in 0 Posts
Hi
thanks for the reply
unfortunately I need to do this as a scheduled task or cron job and so need to have it in a script
tried mget -R, wget -m and even ncftpput but all just giving me files and no directories

madmacher

Last edited by rbatte1; 07-31-2014 at 09:45 AM.. Reason: Added ICODE tags round in-line code
    #4  
Old Unix and Linux 07-31-2014   -   Original Discussion by madmacher
rbatte1's Unix or Linux Image
rbatte1 rbatte1 is offline Forum Staff  
Root armed
 
Join Date: Jun 2007
Last Activity: 20 April 2018, 12:32 PM EDT
Location: Lancashire, UK
Posts: 3,510
Thanks: 1,544
Thanked 689 Times in 619 Posts
You might need to either write something to determine the files and then loop round, or perhaps you could use tar to create a single file, send that and arrange to extract it on the other side.

Could you consider rsync, rcp or scp perhaps? Would one of those meet your needs? It depends what you are running on both sides.

Another way would be to NFS share, but i'm always a little wary of tying machines together in this way.




Robin
Sponsored Links
    #5  
Old Unix and Linux 07-31-2014   -   Original Discussion by madmacher
achenle's Unix or Linux Image
achenle achenle is offline Forum Advisor  
Registered User
 
Join Date: Jun 2009
Last Activity: 8 February 2018, 8:06 AM EST
Posts: 1,012
Thanks: 3
Thanked 155 Times in 147 Posts
What OS on the Unix side? You could just use Samba to share the files out and mount them on the Windows server.
Sponsored Links
Closed

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Copy certain file types recursively while maintaining file structure on destination? rockf1bull Red Hat 1 06-14-2011 09:04 AM
compare XML/flat file with UNIX file system structure shafi2all Programming 6 08-15-2008 02:15 AM
Search attributes in one structure using the values from another structure dhanamurthy Programming 3 03-27-2008 03:37 AM
Why cant i find my ftp directories in the unix structure elduderino UNIX for Dummies Questions & Answers 2 02-14-2008 01:11 PM
Copying a Directory Structure to a new structure jhansrod UNIX for Dummies Questions & Answers 8 07-27-2005 06:24 AM



All times are GMT -4. The time now is 08:45 AM.