Command-line interactive PHP: how to display rsync's progress bar

Hi, all. This command runs fine on the console, displaying its progress bar:

sudo -u user rsync -e ssh -t --partial --progress [email protected]:path/to/big.file /tmp/big.file

But neither of the following works, it just shows the first line, the filename being downloaded, and then nothing is shown while downloading the file:

php -r 'system("sudo -u user rsync -e ssh -t --partial --progress [email protected]:path/to/big.file /tmp/big.file");'

php -r 'passthru("sudo -u user rsync -e ssh -t --partial --progress [email protected]:path/to/big.file /tmp/big.file");'

php -r 'popen("sudo -u user rsync -e ssh -t --partial --progress [email protected]:path/to/big.file /tmp/big.file", "w");'

Any way to do what I want? Thanks.

Sponsor our Newsletter | Privacy Policy | Terms of Service