r.smcp

r.smcp copies file(s) between machines using "smcp" and "r.crc" programs. If results of check sums on the source machine and the target machine are identicals, souce file(s) can be removed. r.smcp returns "0" if files were copied succesfully or the number of file(s) that were not copied correctly. Every time r.smcp fails to copy a file it writes a message into a file called "r.smcp.log" in user's home directory.

Usage

r.smcp [source_file_crc_16] source_file destination_file [ [source_file_crc_16] source_file destination_file] [-crc] [-rm] [-smach source_machine] [-dmach destination_machine]

Description

source_file_crc_16

Numerical result of a source_file check sum using RPN "r.crc" program with 16 bits check block size.

eg.> r.crc source_file 16

source_file_crc_16 source_file

source_file and destination_file

Either a remote file name of the form "remhost:path/file_name", or a local name of the form "path/file_name" (containing no ":" characters, or a "/" before any ":"s). If relative, paths of files are considered relative the home directory if specified with the "remhost:path/file_name" form, or relative to the current directory if specified with the "path/file_name" form.

source_machine and destination_machine

Name of remote hosts to be considered for source file or destination file when not specified in positional arguments.

-crc

When specified, r.smcp expects triplets "source_file_crc_16 source_file destination_file" as positional arguments. Without -crc "source_file_crc_16 " must not be specified and check sum on the source file will be computed by r.smcp localy or through rsh command.

-rm

When specified, r.smcp removes the source file if check sums are succesfull. r.smcp does not remove source file if -rm is ommited or check sums failed.

-smach and dmach

If remote host of a source_file (destination_file ) is not specified with the "remhost:path/file_name" form, r.smcp will used destination_machine (destination_machine ) for host name of the source (destination) file. If smach ( dmach ) is not used and source host ( destination host) is not known through the source_file ( destination_file ) positional arguments, r.smcp will considered source ( destination ) host as the local host.

Exemples

1) Move of local files myfile1 and myfile2 to newton and mach.

pollux>cd /users/dor/arma/spe

pollux>r.crc myfile1 16

56372 myfile1

pollux>r.smcp 56372 myfile1 newton:rsa04/monfichier1 \

` r.crc /users/dor/arma/spe/my_rep/myfile2 16` mach:/users/dor/arma/spe/mon_rep/monfichier2 -rm -crc

2) Move of "asa" files myfile3,myfile4 and myfile5 to CFS.

pollux> r.smcp raid2/myfile3 data/myfile3 raid2/myfile4 data/myfile4 raid1/myfile5 data/myfile5 -rm -smach asa -dmach cfs

 

Author: Simon Pellerin (ARMA)