09-18-2003
Also rcp is great if you can ensure the files are NOT writable on the destination server....
#man rcp
Copy Multiple Files
rcp [-p] [-S size] [-R size] source_file1 [source_file2]... dest_dir
dest_file ......... This option specifies the name of the destination
file. If host name and path name are not
specified, then the existing file is copied into a
file named dest_file in the current directory on
the local system. If dest_file already exists and
is writable, then the existing file is
overwritten. The destination file names are
constructed in the same way as source files except that the usage of file name expansion characters
is forbidden in the case of destination file
names.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi all.
1. How can i copy files from one unix system to another. should i use ftp? so How?
2. How can i create an archive whose extention is tar.gz? and how can i decompress them later?
3. WHat is RPM ? what does it stands for?
Thanks (5 Replies)
Discussion started by: vbs
5 Replies
2. UNIX for Dummies Questions & Answers
Hi,
I'm an intern at a business that just acquired a company that ran off the unix system. They have files on this workstation that they would like to move to a windows XP pro system, but no one (myself included) has enough unix knowledge to know how to do this. It's my understanding that this can... (8 Replies)
Discussion started by: intern
8 Replies
3. Shell Programming and Scripting
I'm in the process of writing a shell script with copies files from one linux box to another using scp. I wish to run this through a cronjob so it cannot be interactive.
This is what I have so far.
#!/bin/sh
PASSWD='passswd'
dateset=$( date | awk '{print $2 $3 $6}')
for dates in $dateset;... (1 Reply)
Discussion started by: tcruicksh
1 Replies
4. IP Networking
Is there a way to transfer files from unix server to windows directory,other than ftp? (1 Reply)
Discussion started by: Preet
1 Replies
5. Shell Programming and Scripting
Hi I want to transfer all files in a folder to another folder. So the files have a ending of .lop.txt
thanks (4 Replies)
Discussion started by: gisele_l
4 Replies
6. UNIX for Advanced & Expert Users
HI Experts,
I have following code to FTP all pdf files from remote (win sever) to Linux box.
function LsFiles(){
ftp -n -i -v $HT <<end_ftp
user $USR $PASSWD
cd $DIRNAME
ls "-lrt *.pdf"
bye
end_ftp
}
LsFiles > list_of_files.txt
function getFiles(){
ftp -n -i -v $HT <<end_ftp... (2 Replies)
Discussion started by: dipeshvshah
2 Replies
7. Shell Programming and Scripting
Hi,
I am new to shell scripting,and i was planning to write a script that will FTP files to destination folder.
All configuration should be done through a properties files.I was planning that All configuration should be done
through a properties files. and finally the output should be... (0 Replies)
Discussion started by: rahul125
0 Replies
8. Shell Programming and Scripting
I have to write script in which I have to copy files from different directories on machine A and put them in corresponding directories in machine B.
Here machine A remains same per project and machine B keeps on changing.
Is there any way through which I can do this using single remote... (1 Reply)
Discussion started by: madhurjajoo
1 Replies
9. Shell Programming and Scripting
hi,
Im using the following code for FTP
#!/usr/bin/ksh
ftp -v -n "10.29.45.11" << cmd
user "mahesva" "mahesva123"
get rtl.tar
quit
cmd
Below is the log when i run the above code
**********************************
Connected to 10.29.45.11.
220 (vsFTPd 2.0.1)
530 Please login with USER... (20 Replies)
Discussion started by: dll_fpga
20 Replies
10. Linux
Hi,
I have to transfer my files using FTP. Few files are in Zipped format (.Z) and few are in .PX format . For zipped files, we need to change the mode to binary while transferring the files whereas for the px files the mode should be ascii.
Eg: sample1.z
sample2.z
sample3.z
sample.px ... (2 Replies)
Discussion started by: vidlaks
2 Replies
RCP(1) BSD General Commands Manual RCP(1)
NAME
rcp -- remote file copy
SYNOPSIS
rcp [-46p] file1 file2
rcp [-46pr] file ... directory
DESCRIPTION
rcp copies files between machines. Each file or directory argument is either a remote file name of the form ``rname@rhost:path'', or a local
file name (containing no ':' (colon) characters, or a '/' (slash) before any ':' (colon) characters).
The rhost can be an IPv4 or an IPv6 address string. Since IPv6 addresses already contain ':' (colon) characters, an IPv6 address string must
be enclosed between '[' (left square bracket) and ']' (right square bracket) characters. Otherwise, the first occurrence of a ':' (colon)
character would be interpreted as the separator between the rhost and the path. For example,
[2001:DB8::800:200C:417A]:tmp/file
Options:
-4 Use IPv4 addresses only.
-6 Use IPv6 addresses only.
-p The -p option causes rcp to attempt to preserve (duplicate) in its copies the modification times and modes of the source files, ignor-
ing the umask. By default, the mode and owner of file2 are preserved if it already existed; otherwise the mode of the source file mod-
ified by the umask(2) on the destination host is used.
-r If any of the source files are directories, rcp copies each subtree rooted at that name; in this case the destination must be a direc-
tory.
If path is not a full path name, it is interpreted relative to the login directory of the specified user ruser on rhost, or your current user
name if no other remote user name is specified. A path on a remote host may be quoted (using , ", or ') so that the metacharacters are
interpreted remotely.
rcp does not prompt for passwords; it performs remote execution via rsh(1), and requires the same authorization.
rcp handles third party copies, where neither source nor target files are on the current machine.
SEE ALSO
cp(1), ftp(1), rcmd(1), rlogin(1), rsh(1), rcmd(3), hosts.equiv(5), rhosts(5), environ(7)
HISTORY
The rcp utility appeared in 4.2BSD. The version of rcp described here has been reimplemented with Kerberos in 4.3BSD-Reno.
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 .login, .profile, or .cshrc file on the remote host.
The destination user and hostname may have to be specified as ``rhost.rname'' when the destination machine is running the 4.2BSD version of
rcp.
BSD
March 8, 2005 BSD