Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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
add comment

1 Answer 1

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
1  
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
add comment

Your Answer

 
discard

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.