Skip to content

This is safe using rsync for combining two dirs to another one? #344

Answered by WayneD
Azq2 asked this question in Q&A
Discussion options

You must be logged in to vote

The flist.c file has comments about this, but I didn't find it mentioned in the manpage. Some of the comments:

/* This file-struct sorting routine makes sure that any identical names in
** the file list stay in the same order as they were in the original list.
** This is particularly vital in inc_recurse mode where we expect a sort
** on the flist to match the exact order of a sort on the dir_flist. */

/* If one is a dir and the other is not, we want to
** keep the dir because it might have contents in the
** list. Otherwise keep the first one. */

So, with identically named files, rsync always chooses the first one encountered. If the second folder has a dir named the same as a file i…

Replies: 4 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by Azq2
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #344 on August 05, 2022 04:44.