Skip to content

Instantly share code, notes, and snippets.

@cmattoon
Created July 15, 2015 13:53
Show Gist options
  • Save cmattoon/ddf685d720d7b57ccbd0 to your computer and use it in GitHub Desktop.
Save cmattoon/ddf685d720d7b57ccbd0 to your computer and use it in GitHub Desktop.
File Transfer with Netcat

Transfer files from A (172.21.1.2) to B (172.21.1.3) using netcat and gzip compression on port 7000.

Optionally uses pipeviewer (pv), which'll probably need installed if you're on Ubuntu (apt-get install pv)

On machine A:

cd src-dir/

tar -zc * | pv | nc 172.21.1.3 7000

On machine B:

cd dst-dir/

nc -l 7000 | pv | tar -xz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment