Last active
December 17, 2015 21:49
-
-
Save miebach/5677146 to your computer and use it in GitHub Desktop.
Move a dierctory tree with rsync over the network
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 | |
[email protected] | |
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