Count of files to be transferred
thealchemistguild at gmail.com
Fri Apr 30 18:26:10 MDT 2010
On May 1, 2010, at 6:58 AM, Robert DuToit wrote:
> I don't know if this is what you are looking for but I have a GUI for rsync (Backuplist+) and now use unix "find directoryPath | wc -l" and it is very fast and gives you the total file count which reflects the rsync count in stats at the end of the run, almost exactly. I then just use the total count and the "to check" number to easily get the # of files transferred of total, for updating a progress bar. You could get fancy and use "find' with options to reflect any options for rsync that may exclude certain files etc...
> This is on OSX but would apply anywhere I would think. For 1 million files it takes about 2.5 minutes for the initial "find" count, on my old Macbook Pro laptop, and then rsync goes about it's business. This is much faster then running rsync non-recursively.
I actually already tried this approach first until I realized the files that will be transferred are often less than the total count returned by "find" so the progress bar was never able to complete totally. In the instance the backup was transferring all files it worked fine but often the transfers just update changed files so the numbers were off.
More information about the rsync