Skip to content

Instantly share code, notes, and snippets.

@dschneider
Last active November 13, 2020 23:07
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save dschneider/2197d2c818e8ea39b9f8 to your computer and use it in GitHub Desktop.
Save dschneider/2197d2c818e8ea39b9f8 to your computer and use it in GitHub Desktop.
Stream file over network with netcat and pigz
# pigz is "A parallel implementation of gzip for modern multi-processor, multi-core machines"
# See http://zlib.net/pigz/
# On the receiving machine run this:
nc -w 10 SENDING_MACHINE_IP 7878 | pigz -d | tar x
# On the sending machine run this:
tar c FILENAME_HERE | pigz | nc -l 7878
# You can compare the md5 checksum from both files after the transfer,
# they should be identical (md5 on Mac OS X and md5sum on Linux and on Windows ... delete Windows)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment