2 ms·
None of those are quite right IMHO: tar -czvf - <sourcedir> | ssh <user>@<remotehost> tar -xzf - -C <remotedir> This is _much_ faster if you're sending over a
by jandrese 7y ago
None of those are quite right IMHO:
tar -czvf - <sourcedir> | ssh <user>@<remotehost> tar -xzf - -C <remotedir>
This is _much_ faster if you're sending over a directory with a lot of small files, especially if the link has even a modest amount of latency. The 'z' parameter can be omitted if the source files are not compressible (media files or already compressed).
If the files are highly compressible but very large you might consider this instead:
tar -cvf - <sourcedir> | pbzip2 -c | ssh <user>@<remotehost> tar -xf - -C <remotedir>