Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

16
  • 13
    Just to reiterate what Caleb says, if you are worried about corruption due to e.g. a flaky network, rsync can make sense, as it verifies every file it writes by checksumming the blocks as it writes them. Commented Dec 1, 2015 at 21:31
  • 9
    the --remove-source-files only deletes the files in the source. if you want to clear our the source, wouldn't you have to do an rm -rf (or find all directories and pass -delete) on the source after rsync runs successfully? Commented Nov 29, 2016 at 13:51
  • 5
    @DanielS.Sterling rsync doesn't checksum blocks after writing them (it uses checksums to find which parts of existing files were updated and need to be synchronized). You can do a second sync with --checksum to tell it to verify the results of the first synchronization. Commented Apr 14, 2019 at 0:28
  • 1
    @darw You mean if there's a system crash during a copy+delete move (move between different filesystems), which results in the source file being deleted but the target not being written? That can happen both with mv and with rsync. Commented Dec 5, 2021 at 19:58
  • 1
    From what I gather --remove-source-files will just delete the files after the copy. Therefore moving a 50GB file will take a very long time. So this answer does not seem correct. Commented Apr 3, 2024 at 6:39