in reply to Re: unix rcp command within a system call
in thread unix rcp command within a system call

i know i intentioanlly had it that way..... it was to check the return codes from a valid rcp call, and an invalid one... that is the reason i delete the min.txt if does exist i am trying to test here the return code by a valid vs. an invalid rcp command
  • Comment on Re: Re: unix rcp command within a system call

Replies are listed 'Best First'.
Re: Re: Re: unix rcp command within a system call
by jlongino (Parson) on Aug 28, 2001 at 23:16 UTC
    After perusing the man pages on rcp (there is at least one documented case in which rcp "may not correctly fail") and the given results you've had, I doubt you will be able to use it reliably without substantial, manual error checking of your own afterwards. E.g., manually checking after issuing the command to see if the resulting file or directory structures was successfully copied. That will probably necessitate the use of Net:Ftp or Net::Telnet module. Perhaps there is another module I'm unaware of.

    If you are just trying to copy a few files, I would use Net::Ftp. If you want to copy directory structures, you might look at using tar in conjunction with Net::Telnet.

    If the code and the comments disagree, then both are probably wrong. -- Norm Schryer