I have these folders:
. ├── result ├── test │ ├── file1 │ ├── file2 │ ├── file3 │ └── file4 └── test2 ├── file1 ├── file2 ├── file3 └── file5
testis the original folder.
test2some files are different, others are identical and others only exist in there.
I want to user rsync to copy in
result only those files in
test2 that are newer that those on
test or that doesn't exist on
I run any os the following, varying whether or not there's a
--compare-dest and the name of the folder, whether or not the folder name has a trailing slash, or even inverting the parameters, just in case I'm missunderstanding what folder is compare-dest :
rsync -av --dry-run --itemize-changes --compare-dest=test2 test/ result/ rsync -av --dry-run --itemize-changes --compare-dest=test2/ test/ result/ rsync -arv --dry-run --itemize-changes --compare-dest test test2/ result/ rsync -arv --dry-run --itemize-changes --compare-dest test/ test2/ result/
All of them tell me:
--compare-dest arg does not exist: NAME_OF_EXISTING_FOLDER
- What am I doing wrong?
- What's the correct command I have ro issue to satisfy the requirement I explain at the beginning of this question?