geektron has asked for the wisdom of the Perl Monks concerning the following question:

I've looked through the libnet modules, but haven't found anything that would imitate/ emulate the Berkely 'r' commands ( rcp in particular). Has anyone subclassed the libnet packages to do this, or found any other way than backticks?

Replies are listed 'Best First'.
Re: module for 'r' commands?
by cianoz (Friar) on Aug 28, 2000 at 13:29 UTC
    I've found a "Net::Rexec" on CPAN
    (as the name suggests is an implementation of rexec)
    no rcp, sorry (and no scp, that would be really neat...:)
      I believe the rest of the r-commands (like rcp and rsh) are built on top of the rexec protocol. I know that when you turn off the rexec daemon, they all go away. {grin} Look at the source for the rcp command in Linux or BSD-something.

      -- Randal L. Schwartz, Perl hacker

        Not necessarily true, as I can verify that Solaris will still allow rcp and rsh after commenting rexec out of the inetd.conf and doing a
        # kill -HUP $(ps -ef | grep "[i]netd" | awk '{print $2}')
        or am I missing something?
      thanks. that might do the trick. rcp should work with it, since one of the args for the method (i don't remember the name) is the 'r' command.