Home: Perl Programming Help: Beginner:
Rsync with ssh



lsy
Novice

May 22, 2012, 5:32 PM


Views: 3043
Rsync with ssh

is perl have a function which can serve like this

Code
ssh host1 "rsync -avz filepath host2:filepath;"

i know i can directly use this command, but i would like the rsync return me the transfer result.


winfinit
User

Jul 13, 2012, 12:52 PM


Views: 2662
Re: [lsy] Rsync with ssh

my @out = `rsync -avn /tmp ~/`;
foreach my $row ( @out ) {
print $row;
}