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.

Required fields*

6
  • 10
    I don't think rsync can replace mv. I would expect mv to be faster on most file system types when the source and destination are within the same file system, because rsync would have to make a copy no matter what, and mv could probably get away with changing a few directory entries. The closest thing I can find to an rsync mv is the --remove-source-files command, but that does not remove directories. Commented Jul 25, 2012 at 17:19
  • 2
    Thanks @jw013! Just to clarify, the files are on different filesystems, and the transfer would be done on a network. Do you know if that would still make mv faster? Commented Jul 25, 2012 at 17:22
  • 1
    Well, mv can't operate across a network - it would have to rely a local mount (e.g. NFS). If the bottleneck is the network, rsync would probably be faster than mv because rsync can do compression. Commented Jul 25, 2012 at 17:25
  • 2
    By the way cp has -u option to copy source file if it is newer than the destination file or when the destination file is missing Commented Jul 25, 2012 at 17:38
  • What about this: Create a timestamp, then rsync all the files to remote. When done, delete all local files older than timestamp. Commented Feb 8, 2022 at 14:01