I'm working on a project where I need to automate the transfer of files securely over a dialup connection. Files need to be moved both ways with wildcard pattern matching needed on both sides to find the right files. I've got this working with ssh and scp, but this requires many separate ssh invocations (especially for retrieving files, e.g. ssh to ls files, scp to copy files, ssh to rm files). There is a noticeable delay for each ssh invocation, and this is more error prone since accidental disconnection (e.g. of the dialup link) could leave the files existing on both sides. This is what I need: - Secure transfers - The ability to send/retrieve all files matching wildcard patterns - The ability to have files deleted after they have been transferred - Atomic operation as much as possible, so that files won't end up existing on both sides in the case of an error - The ability to do it all with as few reconnections as possible It looks like rsync would be great for this, since it can work over ssh, match wildcards on the remote side with --include etc. but there doesn't appear to be a way to remove the files (at least on the remote side) after they have been received, and only one transfer direction is supported per rsync invocation. Is there a way to get around these problems or would I be better off just using ssh or something else? Connecting once per send operation and once per receive operation would be satisfactory, but moving instead of copying is essential. I guess what I really want to be able to do is rsync --move src dest , src2 dest2 , src3 dest3 Also, it seems to be possible to send all the files with rsync and then remove files based on rsync's output with --log-format=%f, but rsync sometimes lists files even if they haven't been successfully transferred. Is this a bug? Is the assumption that a file has been transferred successfully if it is listed on stdout with --log-format and its name did not appear on stderr reasonable? Thanks