Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I killed a local "rsync -ah" process.
It left junk files like ".abc.vmdk.zxivMN" in the target directory.
The junk files do not get deleted on consecutive "rsync -ah" runs.

Details:
I ran diff on both folders I was syncing and it reported: "Only in /mnt/archive1/documents/general: .abc.vmdk.zxivMN"

What is the best way to clean up the temporary rsync files ?

share|improve this question

1 Answer 1

up vote 10 down vote accepted

Tell rsync to delete files not on the source, with --delete-during or --delete-after. Be careful and use this option only if you don't have legitimate files on the target that aren't there on the source.

See man rsync.

Of course, you could always manually delete the files you detected with diff...

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.