SENDING FILES WITH SCP & WORMHOLE

$ scp -p FILE.zip USER@192.x.x.x:access_media/

#Copy files inside directory recursively
#“-r”
$ scp -p -r DIR/ USER@192.x.x.x:access_media/

#compressing & copying a lot files across the network
#“-C”

put it all together,
$ scp -Cpr DIR/ USER@192.x.x.x:access_media/

 

WORMHOLE
Wormhole is a Fast, Secure Way to Send Files to Other Users Through the CLI
$ sudo snap install wormhole

$ wormhole send FILENAME.ZIP

#ON THE OTHER COMPUTER DO:
$ wormhole receive codeXYZ

COMPRESSING WITH XZ & ZIP | NORMAL & MAX COMPRESSION.

HOW TO COMPRESS A DIRECTORY WITH MAX COMPRESSION.
$ tar -cf - Dir-name/ | xz -9 -c - > Dir-name.tar.xz
#use compression 1 to 9
# "-9e" is even better max compression

#to watch progress bar of the current compression job, open new terminal & run:
$ watch -n30 -x pkill -USR1 -n -x xz
#or "-n1" for every second.

#IF YOU DONT CARE ABOUT COMPRESSION LEVELS AND WANT FASTEST JOB RUN:
$ zip -r Dir-name.zip Dir-name/

#You Can Encrypt Data.Zip With A Password By Passing The -E Option:
$ zip -r -e Dir-name.zip Dir-name/