I frequently transfer large directories over
scp and it would be sweet if I could somehow compress the directory, send it, and decompress it all in one.
Is something like this possible?
How about using
This also has the added benefit that if the file already exists and has not changed on the destination, it will not be transferred.
Thanks to @johnshen64's answer, I was able to come up with something quite nice
Unfortunately, this doesn't show progress as it transfers. I have noticed incredible speed improvements using this method.
If anyone know how to show progress for a transfer like this, I'd greatly appreciate the help :)
well, i would use tar instead
tar cf - directory | ssh server 'tar xf -'
you can add v to verify.
zip should be the same, but tar is more robust for linux in my opinion.