Skip to content

Instantly share code, notes, and snippets.

@perpetual-hydrofoil
Forked from Xorlev/gzip chain
Created August 30, 2013 06:30
Show Gist options
  • Save perpetual-hydrofoil/6386846 to your computer and use it in GitHub Desktop.
Save perpetual-hydrofoil/6386846 to your computer and use it in GitHub Desktop.
On the last machine in the chain:
nc -l 1234 | pigz -d | tar xvf -
On each intermediate machine, you use a fifo to copy the data to the next machine as well as decompressing.
mkfifo myfifo
nc $NEXT_SERVER 1234 <myfifo &
nc -l 1234 | tee myfifo | pigz -d | tar xvf -
On the first machine:
tar cv $SOME_DIR | pigz | nc $SERVER 1234
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment