rcp the file


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting rcp the file
# 1  
Old 03-03-2009
rcp the file

Hi
I am using rcp command to copy the file one linux to other linux machine

I need the ouput log for this

like 1 file coied
size of the file
date stamp

my copy comman is

rcp 10.100.11.2:/u01/pr/uni.txt /u05/ryd/uni.txt


once this script run

i need to capture the log file like this
------------------------------------
1 file copied
162 Mar 3 20:54 uni.txt
------------------------------------

I am copying multiple file so i need to append this log
the purpse of this log file is to track any error happend when copying

rds
aboor
# 2  
Old 03-03-2009
I assume that you would be putting all the RCP commands in the script. Setup password-less rcp. To do this, you should have $HOME/.rhosts file defined on the target machine if you are trying to login as root.

once that is done, you can simply use rcp like below:

rcp 10.100.11.2:/u01/pr/uni.txt /u05/ryd/uni.txt >> /log.txt

hope this works for you. I have not tried this but i guess this should work
# 3  
Old 03-04-2009
HI Kunal
I have no idea what this you should have $HOME/.rhosts
I dont have such a file in source system , i am not using root user for rcp
pls advise how to get this log

rds
# 4  
Old 03-06-2009
Hi
Any idea how i can do this
rds
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Rcp between 2 computers

Hi, I need to rcp heavy files between 2 solaris 10/sparc M3000 computers. Currently theses 2 computers are linked via a switch/firewall and the rcp commands take a very long time, I have been told that this is because of the firewall (old one). I asked my client to by a cross ethernet cable and... (2 Replies)
Discussion started by: zionassedo
2 Replies

2. Shell Programming and Scripting

rcp -r || cp -r

what different between two instruction cp -r rcp -r (1 Reply)
Discussion started by: tamer11007
1 Replies

3. Shell Programming and Scripting

How to use rcp to get last file in directory?

If I want to use rcp to get a file from a different host, but I don't know the exact name of the file, I just know it's format, and that it must be the latest file. I need to do this in a ksh script. Here's what I have: #!/usr/bin/ksh rcp host1:/tmp/$(ls ReportFile.* | tail -1)... (1 Reply)
Discussion started by: mrskittles99
1 Replies

4. UNIX for Dummies Questions & Answers

RCP command

hi, When i use RCP command to copy filr from a different servers, it is showing as connection refused??? ca anyone help me out??? thanks, Arun Manas:b: (2 Replies)
Discussion started by: arunmanas
2 Replies

5. UNIX for Dummies Questions & Answers

RCP Failure

I HAVE A PERL SCRIPT WHICH RCP files from one server to another. The script is not having any issues for years and it is running for more than 3 years . Last week it had failed with error "Command timed out " error. Please help me out (2 Replies)
Discussion started by: praviper
2 Replies

6. HP-UX

rcp command

Hi, Good day to you all. I am trying to use rcp command to transfer some files on the remote machine. I have already setup .rhosts on my server and on the remote machine. When I do rcp I get this error message rcmd_af: Lost connection Is anybody familiar with this one? Thanks in advance. ... (3 Replies)
Discussion started by: sodapop
3 Replies

7. UNIX for Dummies Questions & Answers

Rcp

I am trying to set up RCP so root can access a few machines for file transfer. On the target machine, I have set up a .RHOSTS file that looks like: 10.33.1.59 root However when I try to use RCP to copy a file to this machine, I get permission denied. Is it possible since another user is... (1 Reply)
Discussion started by: hshapiro
1 Replies

8. Linux

File size limitation for rcp

Hi I am trying to rcp a file from Solaris box to Linux. When the file size is 2,205,255,047, the rcp fails with the message Jan 10 01:11:53 hqsas167 rsh: pam_authenticate: error Authentication failed However when I rcp a file with smaller size - 9,434,477 - the rcp completes with... (2 Replies)
Discussion started by: schoubal
2 Replies

9. Shell Programming and Scripting

rcp and file attributes

Good day Does anyone have an idea on how I can rcp a file together with its attributes. owner,group, permissions ? Regards J (2 Replies)
Discussion started by: jhansrod
2 Replies

10. UNIX for Dummies Questions & Answers

rcp in SCO 5.0.7

I am installing 5.0.7 on an existing SCO network. The 2 other machines are using 5.0.5 and rcp works daily both ways between the 2 older machines. However I cannot copy from either machine running 5.0.5 to the new 5.0.7 machine - "Permission Denied" /etc/hosts is configured correctly... (4 Replies)
Discussion started by: farmacy
4 Replies
Login or Register to Ask a Question