Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm uploading a file via rsync from my local machine to a server so that a colleague can download it to his machine. Normally I would notify him to start downloading when the upload is complete, but is there some combination of commands that would allow him to begin downloading while I am still uploading, and then resume after my upload is finished to get the complete file? I'd like to do this for individual files and for directories if possible.

share|improve this question
Doesn't rsync already do this by default? How is your colleague downloading the file? – derobert Sep 10 '12 at 14:00
See my comment to Rqomey. – joebolte Sep 10 '12 at 14:11

Rsync creates a temporary file called .filename.$$$$ If your friend wants to download while uploading they should download this file using the -P extension, as once you finished, the file will disappear, and he may have to resume the download using the correct filename

I just tested this with rsync and you can download that temp file while you are uploading it. A little bit messy, but it works!

share|improve this answer
By default, rsync writes data to a temporary file, and then copies the file to the correct location when the file is complete, so I don't think it's as simple as -P. – joebolte Sep 10 '12 at 14:11
@joebolte Indeed I am wrong, the rsync has to be cancelled before the file is created, I have updated my answer with a workaround – Rqomey Sep 10 '12 at 16:34

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.