I always use either rsync or scp in order to copy files from/to a remote machine. Recently, I discovered in the manual of scp (man scp) the flag -C
-C Compression enable. Passes the -C flag to
ssh(1) to enable compression.
Before I discovered this flag, I used to zip before and then scp.
Is it as efficient to just use the -C than zipping and unzipping? When is using one or another process make the transfer faster?
zipis a very "windows"-ish file format. You will almost never see or need it when operating a linux machine with native linux software.taris used for rolling up directories into one file while preserving permissions and names and such, whilegzip,bzip2,xz, etc are used to compress files.tars are often compressed, makingtar.gzandtar.xzcommon formats for archives on linux. I've seen people roll their ownscpworkalike with commands liketar cvz directory | ssh machine 'cd somewhere; tar xz'. – Score_Under Jul 27 '15 at 17:52Compression yesin your.ssh/configfile. – Barmar Jul 29 '15 at 18:54