Skip to content

Instantly share code, notes, and snippets.

@miebach
Last active December 17, 2015 21:49
Show Gist options
  • Save miebach/5677146 to your computer and use it in GitHub Desktop.
Save miebach/5677146 to your computer and use it in GitHub Desktop.
Move a dierctory tree with rsync over the network
#!/bin/sh
# Move a directory tree with rsync over the network.
# Will remove each file immedeateley from the source after transfer!
# Run this on the source machine:
SRC=/src/folder-to-move-away
REMOTE=user@ip.local
TARGET=/target/containing-folder/
rsync -av --remove-source-files $SRC $REMOTE:$TARGET
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment