xxxxxxxxxx
# Transfer a Specific File with Rsync
# To transfer a single file to a remote machine, enter the full path of the source file. For example:
rsync -Pav ~/Dir1/source.pdf user@ip-address:~/Desktop/test
# Make sure you use the quotes for files that contain spaces in the name. For example:
rsync -Pav ~/Desktop/Dir1/"source pdf sample.pdf" user@ip-address:~/Desktop/test
xxxxxxxxxx
# This way you can do the job with your SSH key
rsync -Pav -e "ssh -i $HOME/.ssh/somekey" username@hostname:/from/dir/ /to/dir/
xxxxxxxxxx
# You'll need to fill in a username, the user's IP address,
# and a file/directory to recieve
rsync -av remote-user@<IP address>:/path/to/remote/file /local/destination