question about the recursive algorithm

BP bp25 at riseup.net
Thu Jan 16 13:53:04 UTC 2025


Hello,

I always run rsync as follows: "sudo rsync -PaSHAXvi --del DIR1/
DIR2". I would think that whenever I see in the output of this rsync
command a few lines of the form A/B/... and then further down in the
output again a few lines of the form A/B/... (dots are dirs or files),
then every line between such two lines is also of this form.

I then discovered that this is incorrect (incidentally, the order of the
deleted files here below is not alphabetical?!):

>f+++++++++ A/B/folder1/file1.mkv
>f+++++++++ A/B/folder1/file2.mkv
*deleting A/C/file3.tex
*deleting A/C/file4.pdf
*deleting A/C/file5.txt
cd+++++++++ A/B/folder2/
>f+++++++++ A/B/folder2/file6.html

Is this expected? Reading the manual (section about inductive recursion)
I would think that the only case where rsync jumps unfinished dirs would
be the creation of empty dirs.

But here's the real question: is my hypothesis correct when we restrict
to just lines starting by >, and also to just lines which start by
*deleting? In other words, does the sender never jump folder and back,
and same the receiver (but combined they might, as shown above)?

I would grately appreciate insights. Please, let me know!

Thanks,
BP



More information about the rsync mailing list