by moe · 14y ago · 0 comments
$ tar czf - foo | ssh remote "cd /where/to/unpack && tar xzf -"
This is often significantly faster than rsync, e.g. when copying a directory with many files for the first (or only) time. $ scp -r remote foo /where/to/unpack $ tar cz foo | ssh remote "cd /where/to/unpack && tar xz"IOW, specify "f -". :-)
Or use ssh -C