Zip Files and send over ssh

Remote synch a directory

Compress, copy with ssh, and uncompress:

rsync -arvz -e 'ssh -p <your_port>' --progress <Source DIR> <username>@<your ip>:<Dest DIR>

Zip Files

The -v argument is optional, prints an output with the details of the operation.

gzip regiment.txt battles.txt -v
regiment.txt:	 -2.2% -- replaced with regiment.txt.gz
battles.txt:	 -5.6% -- replaced with battles.txt.gz

Unzip Files

gunzip regiment.txt battles.txt