Skip to content

Instantly share code, notes, and snippets.

@Leen15
Last active January 23, 2018 09:44
Show Gist options
  • Save Leen15/4d4864dcafd370dd6bff7c113fa1c194 to your computer and use it in GitHub Desktop.
Save Leen15/4d4864dcafd370dd6bff7c113fa1c194 to your computer and use it in GitHub Desktop.
Commands for easily copy a file between hosts

LISTEN ON PORT 5555 OF TARGET SERVER FOR RECEIVE THE file.dat

nc -l 5555 > file.dat

SEND THE file.dat FROM THE SOURCE SERVER to TARGET SERVER

apt install pv
pv file.dat | nc server_target_ip 5555
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment