The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 05-26-2009
droppedonjapan droppedonjapan is offline
Registered User
  
 

Join Date: May 2008
Posts: 8
Script Pause Until Rsync Is Done Transferring

Alright, I have this script that pulls files from a few locations, process those files, creates a zip file, rsync's it and then removes everything.

The problem that I'm having is that I do not know how large the rsync'ed zip file is going to be. Right now I'm using a sleep command before I remove all the files and directories created, however I'm uncomfortable in leaving it like this. All it would take would be a large file that it needs to rsync and the script would delete the file before it's done being transferred.

So, is there a way of having the script check the progress of rsync? If not, how would I go about doing something along these lines?