On 01/12/2018 07:17 PM, jdd@dodin.org wrote:
Le 12/01/2018 à 18:43, jdd@dodin.org a écrit :
If I first copy the file list in a file and give it as argument for --files-from, will --delete works?
tested, no it don't works. rsync takes the files in a from-file one at a time.
What else would you expect? It gets a list of files, and processes them one after another. What's wrong with that? Sorry, I'm lost again.
presently, the only thing I find is to blank completely the target and then, using rsync is pointless :-( (may be it's a better cp)
Why erase from the target?
or is there a way to:
* compare the file list on source and target
rsync *does* compare the files on source and target; well, for performance reasons, it compares file size and timestamps only, but you could use the -c option to compare the full content.
* remove files on target that where previously removed on source
ah, that's what the --delete option is for: if file A exists in the destination but no longer in source, then it deletes A in the destination. $ mkdir src dst $ touch dst/myfile $ rsync -avx --delete src/. dst/. sending incremental file list deleting myfile ... Have a nice day, Berny -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org