Hacker News new | past | comments | ask | show | jobs | submit login

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"



For 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 -". :-)


You may not need the z either since it's common to configure ssh to do compression.

Or use ssh -C




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: