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 > help with rcp command

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-06-04, 19:05
saccskiz saccskiz is offline
Registered User
 
Join Date: Feb 2004
Posts: 143
help with rcp command

I have 2 servers DEV1 and DEV2, both having a user name called TOM.
The home for user TOM is /home/TOM on both servers. On DEV1, there is a subdirectory in TOM called INVOICE which I need to copy over to DEV2. (I needed all the files and subdirectories that come under INVOICE to be transferred onto DEV2. (Currently there is no INVOICE directory in DEV2)
So after this is done, DEV2 should have /home/TOM/INVOICE

I am specifically seeking a way to do this using the rcp command. How do I do it?
Thank you
Reply With Quote
  #2 (permalink)  
Old 04-07-04, 01:37
aigles aigles is offline
Registered User
 
Join Date: Jan 2004
Location: Bordeaux, France
Posts: 319
Try this :
Code:
# On DEV1 with user TOM
rcp -r INVOICE DEV2:
__________________
Jean-Pierre.
Reply With Quote
  #3 (permalink)  
Old 04-07-04, 03:02
saccskiz saccskiz is offline
Registered User
 
Join Date: Feb 2004
Posts: 143
Thank you Aigles. I will try it and let you know tomorrow morning.
Reply With Quote
  #4 (permalink)  
Old 04-07-04, 11:13
saccskiz saccskiz is offline
Registered User
 
Join Date: Feb 2004
Posts: 143
When using this command, after DEV2: should i give a path as to where the directory needs to go ?
Reply With Quote
  #5 (permalink)  
Old 04-07-04, 11:23
aigles aigles is offline
Registered User
 
Join Date: Jan 2004
Location: Bordeaux, France
Posts: 319
If you don't specify a path, the directory is created in the home directory of user TOM on DEV2.
__________________
Jean-Pierre.
Reply With Quote
  #6 (permalink)  
Old 04-07-04, 11:29
saccskiz saccskiz is offline
Registered User
 
Join Date: Feb 2004
Posts: 143
Ok. Got you.
Just in case if I wanted it in /usr/dev/ directory which is not a home,
do i mention it as
(from DEV1)
rcp -r INVOICE DEV2:/usr/dev

Thank you
Reply With Quote
  #7 (permalink)  
Old 04-07-04, 13:19
aigles aigles is offline
Registered User
 
Join Date: Jan 2004
Location: Bordeaux, France
Posts: 319
The command OK (but i think that /usr/dev is not a destination to use)
__________________
Jean-Pierre.
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