3 ms·
if you're piping the output of tar, instead of using "tar f -", you can leave off the f argument (since you don't want to specify a file anyway) and tar will de
by timrod 15y ago
if you're piping the output of tar, instead of using "tar f -", you can leave off the f argument (since you don't want to specify a file anyway) and tar will default to stdin/stdout:
$ tar cz foo | ssh remote "cd /where/to/unpack && tar xz"
- ars 15y agoYou may not need the z either since it's common to configure ssh to do compression. Or use ssh -C
- ralph 15y agoFor GNU tar these days that's true, unless you can be sure $TAPE is in its environment. Historically, tar defaulted to a tape device, e.g. /dev/mt0, and you still find vestiges of that, e.g. OpenBSD defaults to /dev/rst0. IOW, specify "f -". :-)