I have an rsync command that works fine from either the Bash command line or a Bash script.
The command is:
rsync -qtz user@hostname:/tmp/p /tmp
When I run the command, it copies the file and runs in less than a second.
If I put the command in a Perl script, the script hangs, and I have to Control-C to kill it.
The Perl script is just this:
system("rsync -qtz user@hostname:/tmp/p /tmp");
What could be going wrong? Other commands (like mv and gzip) work fine in the Perl script. I tried specifying the4 complete path to /usr/bin/rsync, but it doesn't help.