Created
September 1, 2014 15:12
-
-
Save StanAngeloff/0919bf465c2be675b284 to your computer and use it in GitHub Desktop.
Copying modified files from a remote host in a path with spaces using rsync.
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
# Copying modified files from a remote host in a path with spaces using rsync. | |
# NOTE: spaces are double-escaped, e.g., '\\ '. | |
$ ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null user@hostname -- find /remote/path\\ to\\ files/ -type f -ctime -365 -print0 | \ | |
rsync -avz --progress -e "ssh -C -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" -0 --files-from=- user@hostname:/ ./local/path/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment