If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Unix Shell Scripts > ftp

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-19-04, 17:12
saccskiz saccskiz is offline
Registered User
 
Join Date: Feb 2004
Posts: 143
ftp

i know the basic usage of ftp to transfer files.
My requirement now is
I have 2 machines - dev1 and dev2

my home directory on dev1 is /home/biolink

my home directory on dev2 is /home/biolink

Now I needed to transfer all the files, directories, subdirectories that are all present in /home/biolink in dev1 to /home/biolink in dev2.

Is there a way I can ftp it in one shot ? When i tried my normal way
( ftp> put *.* ) from dev1, it only transferred all files that directly came under /home/biolink but not the directories and sub directories

Thanks
Reply With Quote
  #2 (permalink)  
Old 03-19-04, 17:42
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,543
Re: ftp

Did you try mput ?

I know this command transfers all files in the current directory , but, it is worth a try

Cheers
Sathyaram

Quote:
Originally posted by saccskiz
i know the basic usage of ftp to transfer files.
My requirement now is
I have 2 machines - dev1 and dev2

my home directory on dev1 is /home/biolink

my home directory on dev2 is /home/biolink

Now I needed to transfer all the files, directories, subdirectories that are all present in /home/biolink in dev1 to /home/biolink in dev2.

Is there a way I can ftp it in one shot ? When i tried my normal way
( ftp> put *.* ) from dev1, it only transferred all files that directly came under /home/biolink but not the directories and sub directories

Thanks
__________________
Visit the new-look IDUG Website , register to gain access to the excellent content.
Reply With Quote
  #3 (permalink)  
Old 03-19-04, 17:50
saccskiz saccskiz is offline
Registered User
 
Join Date: Feb 2004
Posts: 143
Re: ftp

Yes, I tried mput. It just did the same thing as put. It transferred just the files in the current directory but not folders and sub directories in the current directory.
Any other ways or ideas?
Thanks
Reply With Quote
  #4 (permalink)  
Old 03-22-04, 11:36
asram asram is offline
Registered User
 
Join Date: Jul 2003
Posts: 34
Re: ftp

Quote:
Originally posted by saccskiz
Yes, I tried mput. It just did the same thing as put. It transferred just the files in the current directory but not folders and sub directories in the current directory.
Any other ways or ideas?
Thanks
FTP will not copy the files in the subfolders.
Only way is first tar the files in DEV1 and ftp it and untar the file.
Reply With Quote
  #5 (permalink)  
Old 03-22-04, 12:40
saccskiz saccskiz is offline
Registered User
 
Join Date: Feb 2004
Posts: 143
Re: ftp

Thank you. That worked. I tarred the all the files in the directory and transferred over using ftp.
I have another question on the same lines. Suppose it is me who owns the biolink directory on DEV1 and also I own the biolink directory on DEV2. Hence all files and sub-folders are all owned by me.
BUT.... the user who is performing the ftp and transferring the files over from DEV1 to DEV2 is another user.
For this reason, will it be necessary for me to change the permissions or access once the ftp has been complete on the files on DEV2 ???
My requirement was that the permissions should exaclty match all files and subdiretories on both servers.
Reply With Quote
  #6 (permalink)  
Old 03-22-04, 16:57
asram asram is offline
Registered User
 
Join Date: Jul 2003
Posts: 34
Re: ftp

Quote:
Originally posted by saccskiz
Thank you. That worked. I tarred the all the files in the directory and transferred over using ftp.
I have another question on the same lines. Suppose it is me who owns the biolink directory on DEV1 and also I own the biolink directory on DEV2. Hence all files and sub-folders are all owned by me.
BUT.... the user who is performing the ftp and transferring the files over from DEV1 to DEV2 is another user.
For this reason, will it be necessary for me to change the permissions or access once the ftp has been complete on the files on DEV2 ???
My requirement was that the permissions should exaclty match all files and subdiretories on both servers.
I don't think permissions will change. Whatever the permissions you have while tarring the files will remain the same after untarring.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On