On Wed, 2 Mar 2005 14:54:38 -0800 (PST), susan lam <[EMAIL PROTECTED]> wrote:
> Hi,
> I have a script that copies files from one server to
> another via the scp system call. On unix, I usually do
> a "sum" manually on files to make sure that the files
> got transferred properly.
> 
> I would like to automate this process in perl -
> transferring files over to another server and
> verifying that the checksum matches.
> 
> $rc=system("scp filea serverb:/tmp");
> 
> If $rc==0, does that mean that filea is successfully
> copied over to serverb ie the checksum of both files
> matched? If not, how can I achieve that?

Hi Susan,

I'm pretty sure that if the scp command completes successfully that
the checksums will match.  Others might have the "right" answer.

As far as using scp with Perl, searching CPAN for the Net::SCP module
lets you interface with scp just as easy as using Net::FTP.

HTH,
Kevin
-- 
Kevin Old
[EMAIL PROTECTED]

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to