Sponsored Content
Top Forums Shell Programming and Scripting how to pull files from one machine to another Post 90848 by dangral on Monday 28th of November 2005 10:55:30 AM
Old 11-28-2005
Quote:
Originally Posted by jasongr
I read about the rcp command
It says that I must have a .rhosts file in my login directory

In the example below, 1.2.3.4 is the IP address of the source machine
and 11.22.33.44 is the IP address of the target machine
I invoke the command from the target machine:
rcp 1.2.3.4:/usr/local/apache/htdocs/file.zip 11.22.33.44:/usr/local/apache/htdocs/file.zip

I wait a few seconds and then I get the following error:
Connection refused

any suggestions?
Instead of rcp use scp.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

pull files from window server to aix box

Hi All, I have a new requirment where i have to pull files from windows server to aix box. I am using scp command to pull a files. command is working fine but it is asking password for everytime i m running this command.I want to automate this so that it will not ask any password. ... (1 Reply)
Discussion started by: prasson_ibm
1 Replies

2. Shell Programming and Scripting

How to Pull out multiple files from DB table and redirect all those files to a differetn directory?

Hi everyone!! I have a database table, which has file_name as one of its fields. Example: File_ID File_Name Directory Size 0001 UNO_1232 /apps/opt 234 0002 UNO_1234 /apps/opt 788 0003 UNO_1235 /apps/opt 897 0004 UNO_1236 /apps/opt 568 I have to... (3 Replies)
Discussion started by: ss3944
3 Replies

3. Shell Programming and Scripting

Cat 114 files using grep or awk to pull muliple fields

Files xxxxxxx.txt ------------------------------------------------------------------------------------------------------------------------------------ Req.By: xxxxxxx WABUSH MINES - xxxxxx MINE (1001) Page: 1 Run on: 12/14/09... (4 Replies)
Discussion started by: sctxms
4 Replies

4. UNIX for Dummies Questions & Answers

How to transfer files from one machine to another?

Hello - I am wondering what would be a command to copy files from one machine to another unix machine? For example: I am currently logged into: beta-machine01 my current directory is: /home/router I want to copy file from machine: beta-machine02 the file is located inside:... (1 Reply)
Discussion started by: DallasT
1 Replies

5. Shell Programming and Scripting

shell script to copy files frm a linux machine to a windows machine using SCP

I need a shell script to copy files frm a linux machine to a windows machine using SCP. The files keeps changing day-to-day. I have to copy the latest file to the windows machine frm the linux machine. for example :In Linux, On July 20, the file name will be 20.txt and it should be copied to... (3 Replies)
Discussion started by: nithin6034
3 Replies

6. Shell Programming and Scripting

How to transfer files from unix machine to local machine using shell script?

Hi All.. Am new to Unix!! Am creating a shell script in which a scenario is like i have transfer the output file from unix machine (Server) to local directory (Windows xp). And also i have to transfer the input file from the local directory to Unix machine (Server) Any help from you... (1 Reply)
Discussion started by: vidhyaS
1 Replies

7. Shell Programming and Scripting

Pull only new files from Server A to Server B

Hi, I am very new to shell scripting and need to create shel script for following : Look continuously for new files in server A(/hosting/apps) and as they arrive pull it to server B (/hosting/landing). Note - only new files that have arrived in server A should be pulled into Server B.... (3 Replies)
Discussion started by: aditya16in
3 Replies

8. UNIX for Advanced & Expert Users

FTP While transfering files to local machine to remote machine

Hi Am using unix Ksh Am getting the problem while transferring zero size files through the script . When i transfer zero size files from local machine to remote machine manually i can able to do it . My question its beause of zero size files am not able to transfer through script ? or its... (2 Replies)
Discussion started by: Venkatesh1
2 Replies

9. Shell Programming and Scripting

How do I use grep to pull incremental data and send to multiple files?

Hi Everyone, Im currently using the below code to pull data from a large CSV file and put it into smaller files with just the data associated with the number that I "grep". grep 'M053' test.csv > test053.csv Is there a way that I can use grep to run through my file like the example below... (6 Replies)
Discussion started by: TheStruggle
6 Replies

10. Shell Programming and Scripting

Compare files to pull changed records only

Hi, I am using Sun Solaris - SunOS. I have two fixed width files shown below. I am trying to find the changes in the records in the Newfile.txt for the records where the key column matches. The first column is a key column (example: A123). If there are any new or deletion of records in the... (4 Replies)
Discussion started by: Saanvi1
4 Replies
RCP(1)							      General Commands Manual							    RCP(1)

NAME
rcp - remote file copy SYNOPSIS
rcp [-p] file1 file2 rcp [-pr] file ... directory DESCRIPTION
Rcp copies files between machines. Each file or directory argument is either a remote file name of the form ``rhost:path'', or a local file name (containing no `:' characters, or a `/' before any `:'s). If the -r option is specified and any of the source files are directories, rcp copies each subtree rooted at that name; in this case the destination must be a directory. By default, the mode and owner of file2 are preserved if it already existed; otherwise the mode of the source file modified by the umask(2) on the destination host is used. The -p option causes rcp to attempt to preserve (duplicate) in its copies the modification times and modes of the source files, ignoring the umask. If path is not a full path name, it is interpreted relative to your login directory on rhost. A path on a remote host may be quoted (using , ", or ') so that the metacharacters are interpreted remotely. Rcp does not prompt for passwords; your current local user name must exist on rhost and allow remote command execution via rsh(1). Rcp handles third party copies, where neither source nor target files are on the current machine. Hostnames may also take the form ``rname@rhost'' to use rname rather than the current user name on the remote host. The destination hostname may also take the form ``rhost.rname'' to support destination machines that are running 4.2BSD versions of rcp. SEE ALSO
cp(1), ftp(1), rsh(1), rlogin(1). BUGS
Doesn't detect all cases where the target of a copy might be a file in cases where only a directory should be legal. Is confused by any output generated by commands in a .profile, or .*shrc file on the remote host. 4.2 Berkeley Distribution May 12, 1986 RCP(1)
All times are GMT -4. The time now is 05:24 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy