rsync rsh code example

Example 1: rsync ssh

# 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

Example 2: rsync

# It is a Lunux/UNIX tool to copy files to and from remote, 
# and between local directories.
# This tool is more efficient and versatile than SCP. 

rsync [options (it has a lot)] [source] [destination]

# To push
rsync [options] /tmp/myfile.txt [email protected]:/home

# To pull
rsync [options] [email protected]:/home/myfile.txt /tmp/

Handy options:
--compress --recursive --verbose